Package gnu.mail.providers.imap
Class IMAPMultipartDataSource
- java.lang.Object
-
- gnu.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
Fields Modifier and Type Field Description protected IMAPMultipartmultipartThe multipart object this data source is associated with.
-
Constructor Summary
Constructors Modifier Constructor Description protectedIMAPMultipartDataSource(IMAPMultipart multipart)Called by the IMAPMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BodyPartgetBodyPart(int index)Returns the secified sub-part of the multipart.java.lang.StringgetContentType()Returns the content type of the body part that contains the multipart.intgetCount()Returns the number of sub-parts of the multipart.java.io.InputStreamgetInputStream()Returns an input stream from which the content of this multipart can be read.java.lang.StringgetName()Returns the content description of the body part that contains the multipart.java.io.OutputStreamgetOutputStream()IMAP multiparts are read-only.
-
-
-
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:
getNamein interfacejavax.activation.DataSource
-
getContentType
public java.lang.String getContentType()
Returns the content type of the body part that contains the multipart.- Specified by:
getContentTypein interfacejavax.activation.DataSource
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionReturns an input stream from which the content of this multipart can be read.- Specified by:
getInputStreamin interfacejavax.activation.DataSource- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOExceptionIMAP multiparts are read-only.- Specified by:
getOutputStreamin interfacejavax.activation.DataSource- Throws:
java.io.IOException
-
getBodyPart
public BodyPart getBodyPart(int index) throws MessagingException
Returns the secified sub-part of the multipart.- Specified by:
getBodyPartin interfaceMultipartDataSource- 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:
getCountin interfaceMultipartDataSource
-
-