⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
gnu.mail.providers.imap

Class IMAPMessage

java.lang.Object
|
+--javax.mail.Message
   |
   +--javax.mail.internet.MimeMessage
      |
      +--gnu.mail.providers.ReadOnlyMessage
         |
         +--gnu.mail.providers.imap.IMAPMessage


public final class IMAPMessage
extends ReadOnlyMessage

The message class implementing the IMAP4 mail protocol.
Author:

Field Summary

boolean

headersComplete

If set, the current set of headers is complete.

String

internalDate

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

static DateFormat

internalDateFormat

The date format used to parse IMAP INTERNALDATE values.

Method Summary

Enumeration

getAllHeaderLines()

Enumeration

getAllHeaders()

Object

getContent()

InputStream

getContentStream()

Returns the raw content stream.

DataHandler

getDataHandler()

Returns a data handler for this message's content.

Flags

getFlags()

String[]

getHeader(String name)

Returns the specified header field.

String

getHeader(String name, String delimiter)

Returns the specified header field.

Enumeration

getMatchingHeaderLines(String[] names)

Enumeration

getMatchingHeaders(String[] names)

Enumeration

getNonMatchingHeaderLines(String[] names)

Enumeration

getNonMatchingHeaders(String[] names)

Date

getReceivedDate()

Returns the date on which this message was received.

boolean

isSet(Flags.Flag flag)

void

setFlags(Flags flag, boolean set)

Set the specified flags.

void

writeTo(OutputStream msgStream)

void

writeTo(OutputStream msgStream, String[] ignoreList)

Field Details

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.

Method Details

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.

Parameters:
name

getHeader

public String getHeader(String name, String delimiter)

Returns the specified header field.

Parameters:
name
delimiter

getMatchingHeaderLines

public Enumeration getMatchingHeaderLines(String[] names)

Parameters:
names

getMatchingHeaders

public Enumeration getMatchingHeaders(String[] names)

Parameters:
names

getNonMatchingHeaderLines

public Enumeration getNonMatchingHeaderLines(String[] names)

Parameters:
names

getNonMatchingHeaders

public Enumeration getNonMatchingHeaders(String[] names)

Parameters:
names

getReceivedDate

public Date getReceivedDate()

Returns the date on which this message was received.


isSet

public boolean isSet(Flags.Flag flag)

Parameters:
flag

setFlags

public void setFlags(Flags flag, boolean set)

Set the specified flags.

Parameters:
flag
set

writeTo

public void writeTo(OutputStream msgStream)

Parameters:
msgStream

writeTo

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

Parameters:
msgStream
ignoreList