MimeMessage.RecipientType
cachedContent, content, contentStream, dh, flags, headers, modified, saved
ATTACHMENT, 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, setHeader
addFrom, 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, writeTo
addRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
public java.util.Date getReceivedDate() throws MessagingException
MimeMessage
getReceivedDate
in class MimeMessage
MessagingException
public int getSize() throws MessagingException
MimeMessage
Note 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 Part
getSize
in class MimeMessage
MessagingException
public int getLineCount() throws MessagingException
MimeMessage
Note 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 Part
getLineCount
in class MimeMessage
MessagingException
public java.lang.String getContentType() throws MessagingException
MimeMessage
getContentType
in interface Part
getContentType
in class MimeMessage
MessagingException
public java.lang.String getDisposition() throws MessagingException
MimeMessage
null
if the header is not available.getDisposition
in interface Part
getDisposition
in class MimeMessage
MessagingException
MimeBodyPart.getDisposition()
public java.lang.String getEncoding() throws MessagingException
MimeMessage
getEncoding
in interface MimePart
getEncoding
in class MimeMessage
MessagingException
MimeBodyPart.getEncoding()
public java.lang.String getContentID() throws MessagingException
MimeMessage
getContentID
in interface MimePart
getContentID
in class MimeMessage
MessagingException
MimeBodyPart.getContentID()
public java.lang.String[] getContentLanguage() throws MessagingException
MimeMessage
null
if this header is not available.getContentLanguage
in interface MimePart
getContentLanguage
in class MimeMessage
MessagingException
MimeBodyPart.getContentLanguage()
public java.lang.String getDescription() throws MessagingException
MimeMessage
If the Content-Description field is encoded as per RFC 2047, it is decoded and converted into Unicode.
getDescription
in interface Part
getDescription
in class MimeMessage
MessagingException
MimeBodyPart.getDescription()
public java.lang.String getMessageID() throws MessagingException
MimeMessage
getMessageID
in class MimeMessage
MessagingException
public java.lang.String getFileName() throws MessagingException
MimeMessage
This 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 Part
getFileName
in class MimeMessage
MessagingException
MimeBodyPart.getFileName()
protected java.io.InputStream getContentStream() throws MessagingException
MimeMessage
getContentStream
in class MimeMessage
MessagingException
MimeBodyPart.getContentStream()
public javax.activation.DataHandler getDataHandler() throws MessagingException
MimeMessage
getDataHandler
in interface Part
getDataHandler
in class MimeMessage
MessagingException
protected void updateHeaders() throws MessagingException
MimeMessage
updateHeaders
in class MimeMessage
MessagingException
MimeBodyPart.updateHeaders()
public java.lang.String[] getHeader(java.lang.String name) throws MessagingException
getHeader
in interface Part
getHeader
in class MimeMessage
name
- the header nameMessagingException
public java.lang.String getHeader(java.lang.String name, java.lang.String delimiter) throws MessagingException
getHeader
in interface MimePart
getHeader
in class MimeMessage
name
- the header namedelimiter
- the delimiterMessagingException
public java.util.Enumeration getAllHeaders() throws MessagingException
MimeMessage
getAllHeaders
in interface Part
getAllHeaders
in class MimeMessage
MessagingException
public java.util.Enumeration getAllHeaderLines() throws MessagingException
MimeMessage
getAllHeaderLines
in interface MimePart
getAllHeaderLines
in class MimeMessage
MessagingException
public java.util.Enumeration getMatchingHeaders(java.lang.String[] names) throws MessagingException
MimeMessage
getMatchingHeaders
in interface Part
getMatchingHeaders
in class MimeMessage
names
- the header names to matchMessagingException
public java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names) throws MessagingException
MimeMessage
getMatchingHeaderLines
in interface MimePart
getMatchingHeaderLines
in class MimeMessage
MessagingException
public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names) throws MessagingException
MimeMessage
getNonMatchingHeaders
in interface Part
getNonMatchingHeaders
in class MimeMessage
names
- the header names to ignoreMessagingException
public java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names) throws MessagingException
MimeMessage
getNonMatchingHeaderLines
in interface MimePart
getNonMatchingHeaderLines
in class MimeMessage
MessagingException
public java.lang.String getSubject() throws MessagingException
MimeMessage
If the subject is encoded as per RFC 2047, it is decoded and converted into Unicode.
getSubject
in class MimeMessage
MessagingException
public java.util.Date getSentDate() throws MessagingException
MimeMessage
getSentDate
in class MimeMessage
MessagingException
public Flags getFlags() throws MessagingException
MimeMessage
getFlags
in class MimeMessage
MessagingException
public boolean isSet(Flags.Flag flag) throws MessagingException
MimeMessage
isSet
in class MimeMessage
flag
- the flagMessagingException
public void setFlags(Flags flag, boolean set) throws MessagingException
setFlags
in class gnu.mail.providers.ReadOnlyMessage
flag
- the flags to be setset
- the value to be setIllegalWriteException
- if the underlying implementation
does not support modification of existing valuesMessagingException