public final class IMAPMessage
extends gnu.mail.providers.ReadOnlyMessage
MimeMessage.RecipientType| Modifier and Type | Field and Description |
|---|---|
protected boolean |
headersComplete
If set, the current set of headers is complete.
|
protected java.lang.String |
internalDate
If set, this contains the string value of the received date.
|
protected static java.text.DateFormat |
internalDateFormat
The date format used to parse IMAP INTERNALDATE values.
|
protected long |
uid
The UID associated with this message.
|
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.Object |
getContent()
Returns this message's content as a Java object.
|
protected java.io.InputStream |
getContentStream()
Returns the raw content stream.
|
javax.activation.DataHandler |
getDataHandler()
Returns a data handler for this message's content.
|
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.
|
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.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.
|
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.
|
void |
writeTo(java.io.OutputStream msgStream)
Writes this message to the specified stream in RFC 822 format.
|
void |
writeTo(java.io.OutputStream msgStream,
java.lang.String[] ignoreList)
Writes this message to the specified stream in RFC 822 format, without
the specified headers.
|
addHeader, addHeaderLine, removeHeader, saveChanges, setContent, setContent, setHeaderaddFrom, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllRecipients, getContentID, getContentLanguage, getContentMD5, getContentType, getDescription, getDisposition, getEncoding, getFileName, getFrom, getInputStream, getLineCount, getMessageID, getRawInputStream, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, parse, reply, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateHeaders, updateMessageIdaddRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipientprotected java.lang.String internalDate
protected long uid
protected static final java.text.DateFormat internalDateFormat
protected boolean headersComplete
public java.util.Date getReceivedDate()
throws MessagingException
getReceivedDate in class MimeMessageMessagingExceptionpublic javax.activation.DataHandler getDataHandler()
throws MessagingException
getDataHandler in interface PartgetDataHandler in class MimeMessageMessagingExceptionpublic java.lang.Object getContent()
throws MessagingException,
java.io.IOException
MimeMessagegetContent in interface PartgetContent in class MimeMessagejava.io.IOException - if an error occurred in the data handler layerMessagingExceptionprotected java.io.InputStream getContentStream()
throws MessagingException
getContentStream in class MimeMessageMessagingExceptionMimeBodyPart.getContentStream()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 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 valuesMessagingExceptionpublic void writeTo(java.io.OutputStream msgStream)
throws java.io.IOException,
MessagingException
MimeMessagewriteTo in interface PartwriteTo in class MimeMessagejava.io.IOException - if an error occurs writing to the stream or in
the data handler layerMessagingException - if an error occurs fetching the data
to be writtenpublic void writeTo(java.io.OutputStream msgStream,
java.lang.String[] ignoreList)
throws java.io.IOException,
MessagingException
MimeMessagewriteTo in class MimeMessagejava.io.IOException - if an error occurs writing to the stream or in
the data handler layerMessagingException© Copyright 2003, 2004 The Free Software Foundation, All rights reserved