gnu.mail.providers.imap

Class IMAPMessage

public final class IMAPMessage extends ReadOnlyMessage

The message class implementing the IMAP4 mail protocol.

Version: 1.0

Author: Chris Burdess

Field Summary
protected booleanheadersComplete
If set, the current set of headers is complete.
protected StringinternalDate
If set, this contains the string value of the received date.
protected static DateFormatinternalDateFormat
The date format used to parse IMAP INTERNALDATE values.
protected longuid
The UID associated with this message.
Method Summary
EnumerationgetAllHeaderLines()
EnumerationgetAllHeaders()
ObjectgetContent()
protected InputStreamgetContentStream()
Returns the raw content stream.
DataHandlergetDataHandler()
Returns a data handler for this message's content.
FlagsgetFlags()
String[]getHeader(String name)
Returns the specified header field.
StringgetHeader(String name, String delimiter)
Returns the specified header field.
EnumerationgetMatchingHeaderLines(String[] names)
EnumerationgetMatchingHeaders(String[] names)
EnumerationgetNonMatchingHeaderLines(String[] names)
EnumerationgetNonMatchingHeaders(String[] names)
DategetReceivedDate()
Returns the date on which this message was received.
booleanisSet(Flags.Flag flag)
voidsetFlags(Flags flag, boolean set)
Set the specified flags.
voidwriteTo(OutputStream msgStream)
voidwriteTo(OutputStream msgStream, String[] ignoreList)

Field Detail

headersComplete

protected boolean headersComplete
If set, the current set of headers is complete. If false, and a header is requested but returns null, all headers will be requested from the server.

internalDate

protected String internalDate
If set, this contains the string value of the received date.

internalDateFormat

protected static final DateFormat internalDateFormat
The date format used to parse IMAP INTERNALDATE values.

uid

protected long uid
The UID associated with this message.

Method Detail

getAllHeaderLines

public Enumeration getAllHeaderLines()

getAllHeaders

public Enumeration getAllHeaders()

getContent

public Object getContent()

getContentStream

protected InputStream getContentStream()
Returns the raw content stream.

getDataHandler

public DataHandler getDataHandler()
Returns a data handler for this message's content.

getFlags

public Flags getFlags()

getHeader

public String[] getHeader(String name)
Returns the specified header field.

getHeader

public String getHeader(String name, String delimiter)
Returns the specified header field.

getMatchingHeaderLines

public Enumeration getMatchingHeaderLines(String[] names)

getMatchingHeaders

public Enumeration getMatchingHeaders(String[] names)

getNonMatchingHeaderLines

public Enumeration getNonMatchingHeaderLines(String[] names)

getNonMatchingHeaders

public Enumeration getNonMatchingHeaders(String[] names)

getReceivedDate

public Date getReceivedDate()
Returns the date on which this message was received.

isSet

public boolean isSet(Flags.Flag flag)

setFlags

public void setFlags(Flags flag, boolean set)
Set the specified flags.

writeTo

public void writeTo(OutputStream msgStream)

writeTo

public void writeTo(OutputStream msgStream, String[] ignoreList)
©