Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.mail.BodyPart
javax.mail.internet.MimeBodyPart
gnu.mail.providers.imap.IMAPBodyPart
Field Summary | |
protected int |
|
protected IMAPMessage |
|
protected String |
|
protected int |
|
Fields inherited from class javax.mail.internet.MimeBodyPart | |
content , contentStream , dh , headers |
Fields inherited from interface javax.mail.Part | |
ATTACHMENT , INLINE |
Constructor Summary | |
|
Method Summary | |
Object |
|
protected InputStream |
|
DataHandler |
|
int |
|
int |
|
protected int lines
The number of text lines of this part's content.
protected String section
The section used to refer to this part.
protected int size
The size of this part's content in bytes.
protected IMAPBodyPart(IMAPMessage message, IMAPMultipart parent, String section, InternetHeaders headers, int size, int lines) throws MessagingException
Called by the IMAPMessage.
public Object getContent() throws MessagingException, IOException
Returns the content of this part as a Java object. The type of the returned object is of course dependent on the content itself. For instance, the object returned for "text/plain" content is usually a String object. The object returned for a "multipart" content is always a Multipart subclass. For content-types that are unknown to the data handler system, an input stream is returned.
- Specified by:
- getContent in interface Part
- Overrides:
- getContent in interface MimeBodyPart
protected InputStream getContentStream() throws MessagingException
Returns the raw content stream.
- Overrides:
- getContentStream in interface MimeBodyPart
public DataHandler getDataHandler() throws MessagingException
Returns a data handler for this part's content.
- Specified by:
- getDataHandler in interface Part
- Overrides:
- getDataHandler in interface MimeBodyPart
public int getLineCount() throws MessagingException
Returns the number of text lines in the content of this body part.
- Specified by:
- getLineCount in interface Part
- Overrides:
- getLineCount in interface MimeBodyPart
public int getSize() throws MessagingException
Returns the content size of this body part in bytes.
- Overrides:
- getSize in interface MimeBodyPart