gnu.mail.providers.maildir
Class MaildirMessage

java.lang.Object
  extended by javax.mail.Message
      extended by javax.mail.internet.MimeMessage
          extended by gnu.mail.providers.ReadOnlyMessage
              extended by gnu.mail.providers.maildir.MaildirMessage
All Implemented Interfaces:
MimePart, Part

public final class MaildirMessage
extends gnu.mail.providers.ReadOnlyMessage

The message class implementing the Maildir mail protocol.

Author:
Chris Burdess

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage
MimeMessage.RecipientType
 
Field Summary
 
Fields inherited from class javax.mail.internet.MimeMessage
content, contentStream, dh, flags, headers, modified, saved
 
Fields inherited from class javax.mail.Message
expunged, folder, msgnum, session
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.util.Enumeration getAllHeaderLines()
          Returns all the header-lines.
 java.util.Enumeration getAllHeaders()
          Returns all the headers.
protected  java.io.InputStream getContentStream()
          Returns the unencoded bytes of the content.
 javax.activation.DataHandler getDataHandler()
          Returns a data handler for accessing this message's content.
 java.lang.String[] getHeader(java.lang.String name)
          Returns all the values for the specified header name.
 java.lang.String getHeader(java.lang.String name, java.lang.String delimiter)
          Returns all the values for the specified header name as a single string, with headers separated by the given delimiter.
 java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names)
          Returns all the header-lines with any of the given names.
 java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
          Returns all the headers with any of the given names.
 java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names)
          Returns all the header-lines without any of the given names.
 java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
          Returns all the headers without any of the given names.
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).
 
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, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentType, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getInputStream, getLineCount, getMessageID, 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, updateHeaders, writeTo, writeTo
 
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setFlag, setMessageNumber, setRecipient
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setExpunged

protected void setExpunged(boolean expunged)
Allow MaildirFolder access to set the expunged flag after expunge.

Overrides:
setExpunged in class Message

setFlags

public void setFlags(Flags flag,
                     boolean set)
              throws MessagingException
Set the specified flags(reflected in the info field).

Overrides:
setFlags in class gnu.mail.providers.ReadOnlyMessage
Parameters:
flag - the flags to be set
set - the value to be set
Throws:
IllegalWriteException - if the underlying implementation does not support modification of existing values
MessagingException

getHeader

public java.lang.String[] getHeader(java.lang.String name)
                             throws MessagingException
Description copied from class: MimeMessage
Returns all the values for the specified header name. Note that headers may be encoded as per RFC 2047 if they contain non-US-ASCII characters: these should be decoded.

Specified by:
getHeader in interface Part
Overrides:
getHeader in class MimeMessage
Parameters:
name - the header name
Throws:
MessagingException

getHeader

public java.lang.String getHeader(java.lang.String name,
                                  java.lang.String delimiter)
                           throws MessagingException
Description copied from class: MimeMessage
Returns all the values for the specified header name as a single string, with headers separated by the given delimiter. If the delimiter is null, only the first header is returned.

Specified by:
getHeader in interface MimePart
Overrides:
getHeader in class MimeMessage
Parameters:
name - the header name
delimiter - the delimiter
Throws:
MessagingException

getAllHeaders

public java.util.Enumeration getAllHeaders()
                                    throws MessagingException
Description copied from class: MimeMessage
Returns all the headers.

Specified by:
getAllHeaders in interface Part
Overrides:
getAllHeaders in class MimeMessage
Returns:
an Enumeration of Header objects
Throws:
MessagingException

getAllHeaderLines

public java.util.Enumeration getAllHeaderLines()
                                        throws MessagingException
Description copied from class: MimeMessage
Returns all the header-lines.

Specified by:
getAllHeaderLines in interface MimePart
Overrides:
getAllHeaderLines in class MimeMessage
Returns:
an Enumeration of Strings
Throws:
MessagingException

getMatchingHeaders

public java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
                                         throws MessagingException
Description copied from class: MimeMessage
Returns all the headers with any of the given names.

Specified by:
getMatchingHeaders in interface Part
Overrides:
getMatchingHeaders in class MimeMessage
Parameters:
names - the header names to match
Returns:
an Enumeration of Header objects
Throws:
MessagingException

getMatchingHeaderLines

public java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names)
                                             throws MessagingException
Description copied from class: MimeMessage
Returns all the header-lines with any of the given names.

Specified by:
getMatchingHeaderLines in interface MimePart
Overrides:
getMatchingHeaderLines in class MimeMessage
Returns:
an Enumeration of Strings
Throws:
MessagingException

getNonMatchingHeaders

public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
                                            throws MessagingException
Description copied from class: MimeMessage
Returns all the headers without any of the given names.

Specified by:
getNonMatchingHeaders in interface Part
Overrides:
getNonMatchingHeaders in class MimeMessage
Parameters:
names - the header names to ignore
Returns:
an Enumeration of Header objects
Throws:
MessagingException

getNonMatchingHeaderLines

public java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names)
                                                throws MessagingException
Description copied from class: MimeMessage
Returns all the header-lines without any of the given names.

Specified by:
getNonMatchingHeaderLines in interface MimePart
Overrides:
getNonMatchingHeaderLines in class MimeMessage
Returns:
an Enumeration of Strings
Throws:
MessagingException

getDataHandler

public javax.activation.DataHandler getDataHandler()
                                            throws MessagingException
Description copied from class: MimeMessage
Returns a data handler for accessing this message's content.

Specified by:
getDataHandler in interface Part
Overrides:
getDataHandler in class MimeMessage
Throws:
MessagingException

getContentStream

protected java.io.InputStream getContentStream()
                                        throws MessagingException
Description copied from class: MimeMessage
Returns the unencoded bytes of the content.

Overrides:
getContentStream in class MimeMessage
Throws:
MessagingException
See Also:
MimeBodyPart.getContentStream()

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object


© Copyright 2003, 2004 The Free Software Foundation, All rights reserved