Package 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 gnu.mail.providers.ReadOnlyMessage
The message class implementing the Mbox mail protocol.- Author:
- Chris Burdess
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage
MimeMessage.RecipientType
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
fromLine
The From_ line associated with this message.protected static java.lang.String
STATUS
Status header key.-
Fields inherited from class javax.mail.internet.MimeMessage
content, contentStream, dh, flags, headers, modified, saved
-
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MboxMessage(MboxFolder folder, java.lang.String fromLine, java.io.InputStream in, int msgnum)
Creates a Mbox message.protected
MboxMessage(MboxFolder folder, MimeMessage message, int msgnum)
Creates a Mbox message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
protected void
setExpunged(boolean expunged)
Allow MboxFolder access to set the expunged flag after expunge.void
setFlags(Flags flag, boolean set)
Set the specified flags(reflected in theStatus
header).protected void
updateHeaders()
Updates the status header from the current flags.-
Methods inherited from class gnu.mail.providers.ReadOnlyMessage
addHeader, addHeaderLine, removeHeader, saveChanges, setContent, setContent, setHeader
-
Methods inherited from class javax.mail.internet.MimeMessage
addFrom, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, reply, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateMessageId, writeTo, writeTo
-
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setFlag, setMessageNumber, setRecipient
-
-
-
-
Field Detail
-
STATUS
protected static final java.lang.String STATUS
Status header key. This keeps the mbox flags.- See Also:
- Constant Field Values
-
fromLine
protected java.lang.String fromLine
The From_ line associated with this message. We will preserve this if possible.
-
-
Constructor Detail
-
MboxMessage
protected MboxMessage(MboxFolder folder, java.lang.String fromLine, java.io.InputStream in, int msgnum) throws MessagingException
Creates a Mbox message. This is called by the MboxStore.- Throws:
MessagingException
-
MboxMessage
protected MboxMessage(MboxFolder folder, MimeMessage message, int msgnum) throws MessagingException
Creates a Mbox message. This is called by the MboxFolder when appending. It creates a copy of the specified message for the new folder.- Throws:
MessagingException
-
-
Method Detail
-
setExpunged
protected void setExpunged(boolean expunged)
Allow MboxFolder access to set the expunged flag after expunge.- Overrides:
setExpunged
in classMessage
-
setFlags
public void setFlags(Flags flag, boolean set) throws MessagingException
Set the specified flags(reflected in theStatus
header).- Overrides:
setFlags
in classgnu.mail.providers.ReadOnlyMessage
- Parameters:
flag
- the flags to be setset
- the value to be set- Throws:
IllegalWriteException
- if the underlying implementation does not support modification of existing valuesMessagingException
-
updateHeaders
protected void updateHeaders() throws MessagingException
Updates the status header from the current flags.- Overrides:
updateHeaders
in classMimeMessage
- Throws:
MessagingException
- See Also:
MimeBodyPart.updateHeaders()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
-