gnu.mail.providers.imap
Class IMAPMultipartDataSource

java.lang.Object
  extended bygnu.mail.providers.imap.IMAPMultipartDataSource
All Implemented Interfaces:
javax.activation.DataSource, MultipartDataSource

public class IMAPMultipartDataSource
extends java.lang.Object
implements MultipartDataSource

An IMAP multipart component.

Version:
0.1
Author:
Chris Burdess

Field Summary
protected  IMAPMultipart multipart
          The multipart object this data source is associated with.
 
Constructor Summary
protected IMAPMultipartDataSource(IMAPMultipart multipart)
          Called by the IMAPMessage.
 
Method Summary
 BodyPart getBodyPart(int index)
          Returns the secified sub-part of the multipart.
 java.lang.String getContentType()
          Returns the content type of the body part that contains the multipart.
 int getCount()
          Returns the number of sub-parts of the multipart.
 java.io.InputStream getInputStream()
          Returns an input stream from which the content of this multipart can be read.
 java.lang.String getName()
          Returns the content description of the body part that contains the multipart.
 java.io.OutputStream getOutputStream()
          IMAP multiparts are read-only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multipart

protected IMAPMultipart multipart
The multipart object this data source is associated with.

Constructor Detail

IMAPMultipartDataSource

protected IMAPMultipartDataSource(IMAPMultipart multipart)
Called by the IMAPMessage.

Method Detail

getName

public java.lang.String getName()
Returns the content description of the body part that contains the multipart.

Specified by:
getName in interface javax.activation.DataSource

getContentType

public java.lang.String getContentType()
Returns the content type of the body part that contains the multipart.

Specified by:
getContentType in interface javax.activation.DataSource

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream from which the content of this multipart can be read.

Specified by:
getInputStream in interface javax.activation.DataSource
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
IMAP multiparts are read-only.

Specified by:
getOutputStream in interface javax.activation.DataSource
Throws:
java.io.IOException

getBodyPart

public BodyPart getBodyPart(int index)
                     throws MessagingException
Returns the secified sub-part of the multipart.

Specified by:
getBodyPart in interface MultipartDataSource
Parameters:
index - the index of the desired body part
Throws:
MessagingException

getCount

public int getCount()
Returns the number of sub-parts of the multipart.

Specified by:
getCount in interface MultipartDataSource


© Copyright 2003, 2004 The Free Software Foundation, All rights reserved