gnu.mail.providers.maildir
Class MaildirMessage
- MimePart, Part
public final class MaildirMessage
extends gnu.mail.providers.ReadOnlyMessage
The message class implementing the Maildir mail protocol.
boolean | equals(Object other)
|
Enumeration | getAllHeaderLines() - Get all header lines as an Enumeration of Strings.
|
Enumeration | getAllHeaders() - Return all the headers from this Message as an enumeration of Header
objects.
|
protected InputStream | getContentStream() - Produce the raw bytes of the content.
|
DataHandler | getDataHandler() - Return a DataHandler for this Message's content.
|
String[] | getHeader(String name) - Get all the headers for this header_name.
|
String | getHeader(String name, String delimiter) - Get all the headers for this header name, returned as a single String,
with headers separated by the delimiter.
|
Enumeration | getMatchingHeaderLines(String[] names) - Get matching header lines as an Enumeration of Strings.
|
Enumeration | getMatchingHeaders(String[] names) - Return matching headers from this Message as an Enumeration of Header
objects.
|
Enumeration | getNonMatchingHeaderLines(String[] names) - Get non-matching header lines as an Enumeration of Strings.
|
Enumeration | getNonMatchingHeaders(String[] names) - Return non-matching headers from this Message as an Enumeration of Header
objects.
|
protected void | setExpunged(boolean expunged) - Allow MaildirFolder access to set the expunged flag after expunge.
|
void | setFlags(Flags flag, boolean set) - Set the specified flags (reflected in the
info field).
|
addFrom , addHeader , addHeaderLine , addRecipients , addRecipients , createInternetHeaders , 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 , removeHeader , reply , saveChanges , setContent , setContent , setContentID , setContentLanguage , setContentMD5 , setDataHandler , setDescription , setDescription , setDisposition , setFileName , setFlags , setFrom , setFrom , setHeader , setRecipients , setRecipients , setReplyTo , setSender , setSentDate , setSubject , setSubject , setText , setText , updateHeaders , writeTo , writeTo |
addFrom , addRecipient , addRecipients , getAllRecipients , getFlags , getFolder , getFrom , getMessageNumber , getReceivedDate , getRecipients , getReplyTo , getSentDate , getSubject , isExpunged , isSet , match , reply , saveChanges , setExpunged , setFlag , setFlags , setFrom , setFrom , setMessageNumber , setRecipient , setRecipients , setReplyTo , setSentDate , setSubject |
equals
public boolean equals(Object other)
getAllHeaders
public Enumeration getAllHeaders()
throws MessagingException
Return all the headers from this Message as an enumeration of Header
objects.
Note that certain headers may be encoded as per RFC 2047 if they contain
non US-ASCII characters and these should be decoded.
This implementation obtains the headers from the
headers
InternetHeaders object.
- getAllHeaders in interface Part
- getAllHeaders in interface MimeMessage
getContentStream
protected InputStream getContentStream()
throws MessagingException
Produce the raw bytes of the content.
This method is used during parsing, to create a DataHandler object
for the content. Subclasses that can provide a separate input stream
for just the message content might want to override this method.
This implementation just returns a ByteArrayInputStream constructed
out of the content byte array.
- getContentStream in interface MimeMessage
getDataHandler
public DataHandler getDataHandler()
throws MessagingException
Return a DataHandler for this Message's content.
The implementation provided here works as follows. Note the use of the
getContentStream
method to generate the byte stream for
the content. Also note that any transfer-decoding is done automatically
within this method.
getDataHandler() {
if (dh == null) {
dh = new DataHandler(new MimePartDataSource(this));
}
return dh;
}
class MimePartDataSource implements DataSource {
public getInputStream() {
return MimeUtility.decode(
getContentStream(), getEncoding());
}
....
}
- getDataHandler in interface Part
- getDataHandler in interface MimeMessage
getHeader
public String[] getHeader(String name)
throws MessagingException
Get all the headers for this header_name.
Note that certain headers may be encoded as per RFC 2047 if they
contain non US-ASCII characters and these should be decoded.
This implementation obtains the headers from the
headers
InternetHeaders object.
- getHeader in interface Part
- getHeader in interface MimeMessage
getHeader
public String getHeader(String name,
String delimiter)
throws MessagingException
Get all the headers for this header name, returned as a single String,
with headers separated by the delimiter.
If the delimiter is null, only the first header is returned.
- getHeader in interface MimePart
- getHeader in interface MimeMessage
name
- the name of the headerdelimiter
- the delimiter
- the value fields for all headers with this name
setExpunged
protected void setExpunged(boolean expunged)
Allow MaildirFolder access to set the expunged flag after expunge.
- setExpunged in interface Message
setFlags
public void setFlags(Flags flag,
boolean set)
throws MessagingException
Set the specified flags (reflected in the info
field).
- setFlags in interface gnu.mail.providers.ReadOnlyMessage
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved