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 String |
internalDate
If set, this contains the string value of the received date.
|
protected static 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, saved
ATTACHMENT, INLINE
Modifier and Type | Method and Description |
---|---|
Enumeration |
getAllHeaderLines()
Returns all the header-lines.
|
Enumeration |
getAllHeaders()
Returns all the headers.
|
Object |
getContent()
Returns this message's content as a Java object.
|
protected InputStream |
getContentStream()
Returns the raw content stream.
|
DataHandler |
getDataHandler()
Returns a data handler for this message's content.
|
Flags |
getFlags()
Returns the flags for this message.
|
String[] |
getHeader(String name)
Returns the specified header field.
|
String |
getHeader(String name,
String delimiter)
Returns the specified header field.
|
Enumeration |
getMatchingHeaderLines(String[] names)
Returns all the header-lines with any of the given names.
|
Enumeration |
getMatchingHeaders(String[] names)
Returns all the headers with any of the given names.
|
Enumeration |
getNonMatchingHeaderLines(String[] names)
Returns all the header-lines without any of the given names.
|
Enumeration |
getNonMatchingHeaders(String[] names)
Returns all the headers without any of the given names.
|
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(OutputStream msgStream)
Writes this message to the specified stream in RFC 822 format.
|
void |
writeTo(OutputStream msgStream,
String[] ignoreList)
Writes this message to the specified stream in RFC 822 format, without
the specified headers.
|
addHeader, addHeaderLine, removeHeader, saveChanges, setContent, setContent, setHeader
addFrom, 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, updateMessageId
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
protected String internalDate
protected long uid
protected static final DateFormat internalDateFormat
protected boolean headersComplete
public Date getReceivedDate() throws MessagingException
getReceivedDate
in class MimeMessage
MessagingException
public DataHandler getDataHandler() throws MessagingException
getDataHandler
in interface Part
getDataHandler
in class MimeMessage
MessagingException
public Object getContent() throws MessagingException, IOException
MimeMessage
getContent
in interface Part
getContent
in class MimeMessage
IOException
- if an error occurred in the data handler layerMessagingException
protected InputStream getContentStream() throws MessagingException
getContentStream
in class MimeMessage
MessagingException
MimeBodyPart.getContentStream()
public String[] getHeader(String name) throws MessagingException
getHeader
in interface Part
getHeader
in class MimeMessage
name
- the header nameMessagingException
public String getHeader(String name, String delimiter) throws MessagingException
getHeader
in interface MimePart
getHeader
in class MimeMessage
name
- the header namedelimiter
- the delimiterMessagingException
public Enumeration getAllHeaders() throws MessagingException
MimeMessage
getAllHeaders
in interface Part
getAllHeaders
in class MimeMessage
MessagingException
public Enumeration getAllHeaderLines() throws MessagingException
MimeMessage
getAllHeaderLines
in interface MimePart
getAllHeaderLines
in class MimeMessage
MessagingException
public Enumeration getMatchingHeaders(String[] names) throws MessagingException
MimeMessage
getMatchingHeaders
in interface Part
getMatchingHeaders
in class MimeMessage
names
- the header names to matchMessagingException
public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException
MimeMessage
getMatchingHeaderLines
in interface MimePart
getMatchingHeaderLines
in class MimeMessage
MessagingException
public Enumeration getNonMatchingHeaders(String[] names) throws MessagingException
MimeMessage
getNonMatchingHeaders
in interface Part
getNonMatchingHeaders
in class MimeMessage
names
- the header names to ignoreMessagingException
public Enumeration getNonMatchingHeaderLines(String[] names) throws MessagingException
MimeMessage
getNonMatchingHeaderLines
in interface MimePart
getNonMatchingHeaderLines
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
public void writeTo(OutputStream msgStream) throws IOException, MessagingException
MimeMessage
writeTo
in interface Part
writeTo
in class MimeMessage
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(OutputStream msgStream, String[] ignoreList) throws IOException, MessagingException
MimeMessage
writeTo
in class MimeMessage
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