Package gnu.mail.providers.maildir
Class MaildirMessage
- java.lang.Object
-
- javax.mail.Message
-
- javax.mail.internet.MimeMessage
-
- gnu.mail.providers.ReadOnlyMessage
-
- gnu.mail.providers.maildir.MaildirMessage
-
public final class MaildirMessage extends gnu.mail.providers.ReadOnlyMessageThe 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.util.EnumerationgetAllHeaderLines()Returns all the header-lines.java.util.EnumerationgetAllHeaders()Returns all the headers.protected java.io.InputStreamgetContentStream()Returns the unencoded bytes of the content.javax.activation.DataHandlergetDataHandler()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.StringgetHeader(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.EnumerationgetMatchingHeaderLines(java.lang.String[] names)Returns all the header-lines with any of the given names.java.util.EnumerationgetMatchingHeaders(java.lang.String[] names)Returns all the headers with any of the given names.java.util.EnumerationgetNonMatchingHeaderLines(java.lang.String[] names)Returns all the header-lines without any of the given names.java.util.EnumerationgetNonMatchingHeaders(java.lang.String[] names)Returns all the headers without any of the given names.protected voidsetExpunged(boolean expunged)Allow MaildirFolder access to set the expunged flag after expunge.voidsetFlags(Flags flag, boolean set)Set the specified flags(reflected in theinfofield).-
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, 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, setText, updateHeaders, updateMessageId, writeTo, writeTo
-
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setFlag, setMessageNumber, setRecipient
-
-
-
-
Method Detail
-
setExpunged
protected void setExpunged(boolean expunged)
Allow MaildirFolder access to set the expunged flag after expunge.- Overrides:
setExpungedin classMessage
-
setFlags
public void setFlags(Flags flag, boolean set) throws MessagingException
Set the specified flags(reflected in theinfofield).- Overrides:
setFlagsin 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
-
getHeader
public java.lang.String[] getHeader(java.lang.String name) throws MessagingExceptionDescription copied from class:MimeMessageReturns 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:
getHeaderin interfacePart- Overrides:
getHeaderin classMimeMessage- Parameters:
name- the header name- Throws:
MessagingException
-
getHeader
public java.lang.String getHeader(java.lang.String name, java.lang.String delimiter) throws MessagingExceptionDescription copied from class:MimeMessageReturns all the values for the specified header name as a single string, with headers separated by the given delimiter. If the delimiter isnull, only the first header is returned.- Specified by:
getHeaderin interfaceMimePart- Overrides:
getHeaderin classMimeMessage- Parameters:
name- the header namedelimiter- the delimiter- Throws:
MessagingException
-
getAllHeaders
public java.util.Enumeration getAllHeaders() throws MessagingExceptionDescription copied from class:MimeMessageReturns all the headers.- Specified by:
getAllHeadersin interfacePart- Overrides:
getAllHeadersin classMimeMessage- Returns:
- an Enumeration of Header objects
- Throws:
MessagingException
-
getAllHeaderLines
public java.util.Enumeration getAllHeaderLines() throws MessagingExceptionDescription copied from class:MimeMessageReturns all the header-lines.- Specified by:
getAllHeaderLinesin interfaceMimePart- Overrides:
getAllHeaderLinesin classMimeMessage- Returns:
- an Enumeration of Strings
- Throws:
MessagingException
-
getMatchingHeaders
public java.util.Enumeration getMatchingHeaders(java.lang.String[] names) throws MessagingExceptionDescription copied from class:MimeMessageReturns all the headers with any of the given names.- Specified by:
getMatchingHeadersin interfacePart- Overrides:
getMatchingHeadersin classMimeMessage- 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 MessagingExceptionDescription copied from class:MimeMessageReturns all the header-lines with any of the given names.- Specified by:
getMatchingHeaderLinesin interfaceMimePart- Overrides:
getMatchingHeaderLinesin classMimeMessage- Returns:
- an Enumeration of Strings
- Throws:
MessagingException
-
getNonMatchingHeaders
public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names) throws MessagingExceptionDescription copied from class:MimeMessageReturns all the headers without any of the given names.- Specified by:
getNonMatchingHeadersin interfacePart- Overrides:
getNonMatchingHeadersin classMimeMessage- 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 MessagingExceptionDescription copied from class:MimeMessageReturns all the header-lines without any of the given names.- Specified by:
getNonMatchingHeaderLinesin interfaceMimePart- Overrides:
getNonMatchingHeaderLinesin classMimeMessage- Returns:
- an Enumeration of Strings
- Throws:
MessagingException
-
getDataHandler
public javax.activation.DataHandler getDataHandler() throws MessagingExceptionDescription copied from class:MimeMessageReturns a data handler for accessing this message's content.- Specified by:
getDataHandlerin interfacePart- Overrides:
getDataHandlerin classMimeMessage- Throws:
MessagingException
-
getContentStream
protected java.io.InputStream getContentStream() throws MessagingExceptionDescription copied from class:MimeMessageReturns the unencoded bytes of the content.- Overrides:
getContentStreamin classMimeMessage- Throws:
MessagingException- See Also:
MimeBodyPart.getContentStream()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
-