MimeMessage.RecipientTypecachedContent, content, contentStream, dh, flags, headers, modified, savedATTACHMENT, INLINE| Modifier and Type | Method and Description |
|---|---|
java.util.Enumeration |
getAllHeaderLines()
Returns all the header-lines.
|
java.util.Enumeration |
getAllHeaders()
Returns all the headers.
|
java.lang.String |
getContentID()
Returns the value of the Content-ID header field.
|
java.lang.String[] |
getContentLanguage()
Returns the languages specified in the Content-Language header field
of this message, as defined by RFC 1766.
|
protected java.io.InputStream |
getContentStream()
Returns the unencoded bytes of the content.
|
java.lang.String |
getContentType()
Returns the value of the RFC 822 Content-Type header field, or
"text/plain" if the header is not available.
|
javax.activation.DataHandler |
getDataHandler()
Returns a data handler for accessing this message's content.
|
java.lang.String |
getDescription()
Returns the Content-Description header field of this message.
|
java.lang.String |
getDisposition()
Returns the value of the RFC 822 Content-Disposition header field, or
null if the header is not available. |
java.lang.String |
getEncoding()
Returns the value of the Content-Transfer-Encoding header field.
|
java.lang.String |
getFileName()
Returns the filename associated with this message.
|
Flags |
getFlags()
Returns the flags for this message.
|
java.lang.String[] |
getHeader(java.lang.String name)
Returns the specified header field.
|
java.lang.String |
getHeader(java.lang.String name,
java.lang.String delimiter)
Returns the specified header field.
|
int |
getLineCount()
Returns the number of lines in the content of this message, or -1 if
this number cannot be determined.
|
java.util.Enumeration |
getMatchingHeaderLines(java.lang.String[] names)
Returns all the header-lines with any of the given names.
|
java.util.Enumeration |
getMatchingHeaders(java.lang.String[] names)
Returns all the headers with any of the given names.
|
java.lang.String |
getMessageID()
Returns the value of the Message-ID header field.
|
java.util.Enumeration |
getNonMatchingHeaderLines(java.lang.String[] names)
Returns all the header-lines without any of the given names.
|
java.util.Enumeration |
getNonMatchingHeaders(java.lang.String[] names)
Returns all the headers without any of the given names.
|
java.util.Date |
getReceivedDate()
Returns the date on which this message was received.
|
java.util.Date |
getSentDate()
Returns the value of the RFC 822 Date field.
|
int |
getSize()
Returns the size of the content of this message in bytes, or -1 if the
size cannot be determined.
|
java.lang.String |
getSubject()
Returns the value of the Subject header field.
|
boolean |
isSet(Flags.Flag flag)
Indicates whether the specified flag is set in this message.
|
void |
setFlags(Flags flag,
boolean set)
Set the specified flags.
|
protected void |
updateHeaders()
Updates the headers of this part, based on the content.
|
addHeader, addHeaderLine, removeHeader, saveChanges, setContent, setContent, setHeaderaddFrom, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllRecipients, getContent, getContentMD5, getFrom, getInputStream, getRawInputStream, getRecipients, getReplyTo, getSender, isMimeType, parse, reply, reply, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setFrom, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateMessageId, writeTo, writeToaddRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipientpublic java.util.Date getReceivedDate()
throws MessagingException
MimeMessagegetReceivedDate in class MimeMessageMessagingExceptionpublic int getSize()
throws MessagingException
MimeMessageNote that this number may not be an exact measure, but if not -1, it will be suitable for display to the user.
getSize in interface PartgetSize in class MimeMessageMessagingExceptionpublic int getLineCount()
throws MessagingException
MimeMessageNote that this number may not be an exact measure, but if not -1, it will be suitable for display to the user.
getLineCount in interface PartgetLineCount in class MimeMessageMessagingExceptionpublic java.lang.String getContentType()
throws MessagingException
MimeMessagegetContentType in interface PartgetContentType in class MimeMessageMessagingExceptionpublic java.lang.String getDisposition()
throws MessagingException
MimeMessagenull if the header is not available.getDisposition in interface PartgetDisposition in class MimeMessageMessagingExceptionMimeBodyPart.getDisposition()public java.lang.String getEncoding()
throws MessagingException
MimeMessagegetEncoding in interface MimePartgetEncoding in class MimeMessageMessagingExceptionMimeBodyPart.getEncoding()public java.lang.String getContentID()
throws MessagingException
MimeMessagegetContentID in interface MimePartgetContentID in class MimeMessageMessagingExceptionMimeBodyPart.getContentID()public java.lang.String[] getContentLanguage()
throws MessagingException
MimeMessagenull if this header is not available.getContentLanguage in interface MimePartgetContentLanguage in class MimeMessageMessagingExceptionMimeBodyPart.getContentLanguage()public java.lang.String getDescription()
throws MessagingException
MimeMessageIf the Content-Description field is encoded as per RFC 2047, it is decoded and converted into Unicode.
getDescription in interface PartgetDescription in class MimeMessageMessagingExceptionMimeBodyPart.getDescription()public java.lang.String getMessageID()
throws MessagingException
MimeMessagegetMessageID in class MimeMessageMessagingExceptionpublic java.lang.String getFileName()
throws MessagingException
MimeMessageThis method returns the value of the "filename" parameter from the Content-Disposition header field of this message. If the latter is not available, it returns the value of the "name" parameter from the Content-Type header field.
getFileName in interface PartgetFileName in class MimeMessageMessagingExceptionMimeBodyPart.getFileName()protected java.io.InputStream getContentStream()
throws MessagingException
MimeMessagegetContentStream in class MimeMessageMessagingExceptionMimeBodyPart.getContentStream()public javax.activation.DataHandler getDataHandler()
throws MessagingException
MimeMessagegetDataHandler in interface PartgetDataHandler in class MimeMessageMessagingExceptionprotected void updateHeaders()
throws MessagingException
MimeMessageupdateHeaders in class MimeMessageMessagingExceptionMimeBodyPart.updateHeaders()public java.lang.String[] getHeader(java.lang.String name)
throws MessagingException
getHeader in interface PartgetHeader in class MimeMessagename - the header nameMessagingExceptionpublic java.lang.String getHeader(java.lang.String name,
java.lang.String delimiter)
throws MessagingException
getHeader in interface MimePartgetHeader in class MimeMessagename - the header namedelimiter - the delimiterMessagingExceptionpublic java.util.Enumeration getAllHeaders()
throws MessagingException
MimeMessagegetAllHeaders in interface PartgetAllHeaders in class MimeMessageMessagingExceptionpublic java.util.Enumeration getAllHeaderLines()
throws MessagingException
MimeMessagegetAllHeaderLines in interface MimePartgetAllHeaderLines in class MimeMessageMessagingExceptionpublic java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
throws MessagingException
MimeMessagegetMatchingHeaders in interface PartgetMatchingHeaders in class MimeMessagenames - the header names to matchMessagingExceptionpublic java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names)
throws MessagingException
MimeMessagegetMatchingHeaderLines in interface MimePartgetMatchingHeaderLines in class MimeMessageMessagingExceptionpublic java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
throws MessagingException
MimeMessagegetNonMatchingHeaders in interface PartgetNonMatchingHeaders in class MimeMessagenames - the header names to ignoreMessagingExceptionpublic java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names)
throws MessagingException
MimeMessagegetNonMatchingHeaderLines in interface MimePartgetNonMatchingHeaderLines in class MimeMessageMessagingExceptionpublic java.lang.String getSubject()
throws MessagingException
MimeMessageIf the subject is encoded as per RFC 2047, it is decoded and converted into Unicode.
getSubject in class MimeMessageMessagingExceptionpublic java.util.Date getSentDate()
throws MessagingException
MimeMessagegetSentDate in class MimeMessageMessagingExceptionpublic Flags getFlags() throws MessagingException
MimeMessagegetFlags in class MimeMessageMessagingExceptionpublic boolean isSet(Flags.Flag flag) throws MessagingException
MimeMessageisSet in class MimeMessageflag - the flagMessagingExceptionpublic void setFlags(Flags flag, boolean set) throws MessagingException
setFlags in class gnu.mail.providers.ReadOnlyMessageflag - the flags to be setset - the value to be setIllegalWriteException - if the underlying implementation
does not support modification of existing valuesMessagingException