Package gnu.mail.providers.imap
Class IMAPBodyPart
- java.lang.Object
-
- javax.mail.BodyPart
-
- javax.mail.internet.MimeBodyPart
-
- gnu.mail.providers.imap.IMAPBodyPart
-
public class IMAPBodyPart extends MimeBodyPart implements org.jpackage.mail.inet.imap.IMAPConstants
A MIME body part of an IMAP multipart message.- Author:
- Chris Burdess
-
-
Field Summary
Fields Modifier and Type Field Description protected intlinesThe number of text lines of this part's content.protected IMAPMessagemessageThe message this part belongs to.protected java.lang.StringsectionThe section used to refer to this part.protected intsizeThe size of this part's content in bytes.-
Fields inherited from class javax.mail.internet.MimeBodyPart
content, contentStream, dh, headers
-
Fields inherited from interface org.jpackage.mail.inet.imap.IMAPConstants
ACL, ALERT, APPEND, AUTHENTICATE, BAD, BODY, BODY_PEEK, BODYSTRUCTURE, BYE, CAPABILITY, CHECK, CLOSE, COPY, CRAM_MD5, CREATE, DELETE, DELETEACL, ENVELOPE, EXAMINE, EXISTS, EXPUNGE, FETCH, FETCH_FLAGS, FLAG_ANSWERED, FLAG_DELETED, FLAG_DRAFT, FLAG_FLAGGED, FLAG_RECENT, FLAG_SEEN, FLAGS, GETACL, GETQUOTA, GETQUOTAROOT, GSSAPI, HEADER, HEADER_FIELDS, HEADER_FIELDS_NOT, INTERNALDATE, KERBEROS_V4, LIST, LIST_MARKED, LIST_NOINFERIORS, LIST_NOSELECT, LIST_UNMARKED, LISTRIGHTS, LOGIN, LOGINDISABLED, LOGOUT, LSUB, MESSAGES, MYRIGHTS, NAMESPACE, NEWNAME, NIL, NO, NOOP, OK, PARSE, PERMANENTFLAGS, PREAUTH, QUOTA, QUOTAROOT, READ_ONLY, READ_WRITE, RECENT, RENAME, RFC822, RFC822_HEADER, RFC822_SIZE, RFC822_TEXT, RIGHTS_ADMIN, RIGHTS_CREATE, RIGHTS_DELETE, RIGHTS_INSERT, RIGHTS_LOOKUP, RIGHTS_POST, RIGHTS_READ, RIGHTS_SEEN, RIGHTS_WRITE, SEARCH, SEARCH_ALL, SEARCH_ANSWERED, SEARCH_BCC, SEARCH_BEFORE, SEARCH_BODY, SEARCH_CC, SEARCH_DELETED, SEARCH_DRAFT, SEARCH_FLAGGED, SEARCH_FROM, SEARCH_HEADER, SEARCH_KEYWORD, SEARCH_LARGER, SEARCH_NEW, SEARCH_NOT, SEARCH_OLD, SEARCH_ON, SEARCH_OR, SEARCH_RECENT, SEARCH_SEEN, SEARCH_SENTBEFORE, SEARCH_SENTON, SEARCH_SENTSINCE, SEARCH_SINCE, SEARCH_SMALLER, SEARCH_SUBJECT, SEARCH_TEXT, SEARCH_TO, SEARCH_UID, SEARCH_UNANSWERED, SEARCH_UNDELETED, SEARCH_UNDRAFT, SEARCH_UNFLAGGED, SEARCH_UNKEYWORD, SEARCH_UNSEEN, SELECT, SETACL, SETQUOTA, SKEY, STARTTLS, STATUS, STORAGE, STORE, SUBSCRIBE, TRYCREATE, UID, UIDNEXT, UIDVALIDITY, UNSEEN, UNSUBSCRIBE
-
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIMAPBodyPart(IMAPMessage message, IMAPMultipart parent, java.lang.String section, InternetHeaders headers, int size, int lines)Called by the IMAPMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetContent()Returns this part's content as a Java object.protected java.io.InputStreamgetContentStream()Returns the raw content stream.javax.activation.DataHandlergetDataHandler()Returns a data handler for this part's content.intgetLineCount()Returns the number of text lines in the content of this body part.intgetSize()Returns the content size of this body part in bytes.-
Methods inherited from class javax.mail.internet.MimeBodyPart
addHeader, addHeaderLine, attachFile, attachFile, getAllHeaderLines, getAllHeaders, getContentID, getContentLanguage, getContentMD5, getContentType, getDescription, getDisposition, getEncoding, getFileName, getHeader, getHeader, getInputStream, getMatchingHeaderLines, getMatchingHeaders, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, isMimeType, removeHeader, saveFile, saveFile, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setHeader, setText, setText, setText, updateHeaders, writeTo
-
-
-
-
Field Detail
-
message
protected IMAPMessage message
The message this part belongs to.
-
section
protected java.lang.String section
The section used to refer to this part.
-
size
protected int size
The size of this part's content in bytes.
-
lines
protected int lines
The number of text lines of this part's content.
-
-
Constructor Detail
-
IMAPBodyPart
protected IMAPBodyPart(IMAPMessage message, IMAPMultipart parent, java.lang.String section, InternetHeaders headers, int size, int lines) throws MessagingException
Called by the IMAPMessage.- Throws:
MessagingException
-
-
Method Detail
-
getSize
public int getSize() throws MessagingExceptionReturns the content size of this body part in bytes.- Specified by:
getSizein interfacePart- Overrides:
getSizein classMimeBodyPart- Throws:
MessagingException
-
getLineCount
public int getLineCount() throws MessagingExceptionReturns the number of text lines in the content of this body part.- Specified by:
getLineCountin interfacePart- Overrides:
getLineCountin classMimeBodyPart- Throws:
MessagingException
-
getDataHandler
public javax.activation.DataHandler getDataHandler() throws MessagingExceptionReturns a data handler for this part's content.- Specified by:
getDataHandlerin interfacePart- Overrides:
getDataHandlerin classMimeBodyPart- Throws:
MessagingException
-
getContent
public java.lang.Object getContent() throws MessagingException, java.io.IOExceptionDescription copied from class:MimeBodyPartReturns this part's content as a Java object.- Specified by:
getContentin interfacePart- Overrides:
getContentin classMimeBodyPart- Throws:
java.io.IOException- if an error occurred in the data handler layerMessagingException
-
getContentStream
protected java.io.InputStream getContentStream() throws MessagingExceptionReturns the raw content stream.- Overrides:
getContentStreamin classMimeBodyPart- Throws:
MessagingException
-
-