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

Class MboxMessage

java.lang.Object
|
+--javax.mail.Message
   |
   +--javax.mail.internet.MimeMessage
      |
      +--gnu.mail.providers.ReadOnlyMessage
         |
         +--gnu.mail.providers.mbox.MboxMessage


public class MboxMessage
extends ReadOnlyMessage

The message class implementing the Mbox mail protocol.
Author:

Field Summary

static String

STATUS

Status header key.

String

fromLine

The From_ line associated with this message.

Constructor Summary

MboxMessage(MboxFolder folder, String fromLine, InputStream in, int msgnum)

Creates a Mbox message.

MboxMessage(MboxFolder folder, MimeMessage message, int msgnum)

Creates a Mbox message.

Method Summary

boolean

equals(Object other)

void

setExpunged(boolean expunged)

Allow MboxFolder access to set the expunged flag after expunge.

synchronized void

setFlags(Flags flag, boolean set)

Set the specified flags (reflected in the Status header).

void

updateHeaders()

Updates the status header from the current flags.

Field Details

STATUS

protected static final String STATUS

Status header key. This keeps the mbox flags.


fromLine

protected String fromLine

The From_ line associated with this message. We will preserve this if possible.

Constructor Details

MboxMessage

protected MboxMessage(MboxFolder folder, String fromLine, InputStream in, int msgnum)

Creates a Mbox message. This is called by the MboxStore.

Parameters:
folder
fromLine
in
msgnum

MboxMessage

protected MboxMessage(MboxFolder folder, MimeMessage message, int msgnum)

Creates a Mbox message. This is called by the MboxFolder when appending. It creates a copy of the specified message for the new folder.

Parameters:
folder
message
msgnum

Method Details

equals

public boolean equals(Object other)

Parameters:
other

setExpunged

protected void setExpunged(boolean expunged)

Allow MboxFolder access to set the expunged flag after expunge.

Parameters:
expunged

setFlags

public synchronized void setFlags(Flags flag, boolean set)

Set the specified flags (reflected in the Status header).

Parameters:
flag
set

updateHeaders

protected void updateHeaders()

Updates the status header from the current flags.