gnu.mail.providers.imap
Class IMAPBodyPart
- IMAPConstants, MimePart, Part
public class IMAPBodyPart
implements IMAPConstants
A MIME body part of an IMAP multipart message.
protected int | lines - The number of text lines of this part's content.
|
protected IMAPMessage | message - The message this part belongs to.
|
protected String | section - The section used to refer to this part.
|
protected int | size - The size of this part's content in bytes.
|
Object | getContent() - Return the content as a java object.
|
protected InputStream | getContentStream() - Returns the raw content stream.
|
DataHandler | getDataHandler() - Returns a data handler for this part's content.
|
int | getLineCount() - Returns the number of text lines in the content of this body part.
|
int | getSize() - Returns the content size of this body part in bytes.
|
addHeader , addHeaderLine , getAllHeaderLines , getAllHeaders , getContent , getContentID , getContentLanguage , getContentMD5 , getContentStream , getContentType , getDataHandler , getDescription , getDisposition , getEncoding , getFileName , getHeader , getHeader , getInputStream , getLineCount , getMatchingHeaderLines , getMatchingHeaders , getNonMatchingHeaderLines , getNonMatchingHeaders , getRawInputStream , getSize , isMimeType , removeHeader , setContent , setContent , setContentID , setContentLanguage , setContentMD5 , setDataHandler , setDescription , setDescription , setDisposition , setFileName , setHeader , setText , setText , updateHeaders , writeTo |
lines
protected int lines
The number of text lines of this part's content.
message
protected IMAPMessage message
The message this part belongs to.
section
protected String section
The section used to refer to this part.
size
protected int size
The size of this part's content in bytes.
getContent
public Object getContent()
throws MessagingException,
IOException
Return the content as a java object.
The type of the object returned is of course dependent on the content
itself. For example, the native format of a text/plain content is
usually a String object. The native format for a "multipart" content is
always a Multipart subclass. For content types that are unknown to the
DataHandler system, an input stream is returned as the content.
This implementation obtains the content from the DataHandler.
That is, it invokes
getDataHandler().getContent();
- getContent in interface Part
- getContent in interface MimeBodyPart
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved