|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.Message
javax.mail.internet.MimeMessage
gnu.mail.providers.ReadOnlyMessage
gnu.mail.providers.imap.IMAPMessage
public final class IMAPMessage
The message class implementing the IMAP4 mail protocol.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage |
---|
MimeMessage.RecipientType |
Field Summary | |
---|---|
protected boolean |
headersComplete
If set, the current set of headers is complete. |
protected java.lang.String |
internalDate
If set, this contains the string value of the received date. |
protected static java.text.DateFormat |
internalDateFormat
The date format used to parse IMAP INTERNALDATE values. |
protected long |
uid
The UID associated with this message. |
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 | |
---|---|
java.util.Enumeration |
getAllHeaderLines()
Returns all the header-lines. |
java.util.Enumeration |
getAllHeaders()
Returns all the headers. |
java.lang.Object |
getContent()
Returns this message's content as a Java object. |
protected java.io.InputStream |
getContentStream()
Returns the raw content stream. |
DataHandler |
getDataHandler()
Returns a data handler for this message's content. |
Flags |
getFlags()
Returns the flags for this message. |
java.lang.String[] |
getHeader(java.lang.String name)
Returns the specified header field. |
java.lang.String |
getHeader(java.lang.String name,
java.lang.String delimiter)
Returns the specified header field. |
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. |
java.util.Date |
getReceivedDate()
Returns the date on which this message was received. |
boolean |
isSet(Flags.Flag flag)
Indicates whether the specified flag is set in this message. |
void |
setFlags(Flags flag,
boolean set)
Set the specified flags. |
void |
writeTo(java.io.OutputStream msgStream)
Writes this message to the specified stream in RFC 822 format. |
void |
writeTo(java.io.OutputStream msgStream,
java.lang.String[] ignoreList)
Writes this message to the specified stream in RFC 822 format, without the specified headers. |
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, getContentID, getContentLanguage, getContentMD5, getContentType, getDescription, getDisposition, getEncoding, getFileName, getFrom, getInputStream, getLineCount, getMessageID, getRawInputStream, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, parse, reply, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, updateHeaders |
Methods inherited from class javax.mail.Message |
---|
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String internalDate
protected long uid
protected static final java.text.DateFormat internalDateFormat
protected boolean headersComplete
Method Detail |
---|
public java.util.Date getReceivedDate() throws MessagingException
getReceivedDate
in class MimeMessage
MessagingException
public DataHandler getDataHandler() throws MessagingException
getDataHandler
in interface Part
getDataHandler
in class MimeMessage
MessagingException
public java.lang.Object getContent() throws MessagingException, java.io.IOException
MimeMessage
getContent
in interface Part
getContent
in class MimeMessage
java.io.IOException
- if an error occurred in the data handler layer
MessagingException
protected java.io.InputStream getContentStream() throws MessagingException
getContentStream
in class MimeMessage
MessagingException
MimeBodyPart.getContentStream()
public java.lang.String[] getHeader(java.lang.String name) throws MessagingException
getHeader
in interface Part
getHeader
in class MimeMessage
name
- the header name
MessagingException
public java.lang.String getHeader(java.lang.String name, java.lang.String delimiter) throws MessagingException
getHeader
in interface MimePart
getHeader
in class MimeMessage
name
- the header namedelimiter
- the delimiter
MessagingException
public java.util.Enumeration getAllHeaders() throws MessagingException
MimeMessage
getAllHeaders
in interface Part
getAllHeaders
in class MimeMessage
MessagingException
public java.util.Enumeration getAllHeaderLines() throws MessagingException
MimeMessage
getAllHeaderLines
in interface MimePart
getAllHeaderLines
in class MimeMessage
MessagingException
public java.util.Enumeration getMatchingHeaders(java.lang.String[] names) throws MessagingException
MimeMessage
getMatchingHeaders
in interface Part
getMatchingHeaders
in class MimeMessage
names
- the header names to match
MessagingException
public java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names) throws MessagingException
MimeMessage
getMatchingHeaderLines
in interface MimePart
getMatchingHeaderLines
in class MimeMessage
MessagingException
public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names) throws MessagingException
MimeMessage
getNonMatchingHeaders
in interface Part
getNonMatchingHeaders
in class MimeMessage
names
- the header names to ignore
MessagingException
public java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names) throws MessagingException
MimeMessage
getNonMatchingHeaderLines
in interface MimePart
getNonMatchingHeaderLines
in class MimeMessage
MessagingException
public Flags getFlags() throws MessagingException
MimeMessage
getFlags
in class MimeMessage
MessagingException
public boolean isSet(Flags.Flag flag) throws MessagingException
MimeMessage
isSet
in class MimeMessage
flag
- the flag
MessagingException
public void setFlags(Flags flag, boolean set) throws MessagingException
setFlags
in class gnu.mail.providers.ReadOnlyMessage
flag
- the flags to be setset
- the value to be set
IllegalWriteException
- if the underlying implementation
does not support modification of existing values
MessagingException
public void writeTo(java.io.OutputStream msgStream) throws java.io.IOException, MessagingException
MimeMessage
writeTo
in interface Part
writeTo
in class MimeMessage
java.io.IOException
- if an error occurs writing to the stream or in
the data handler layer
MessagingException
- if an error occurs fetching the data
to be writtenpublic void writeTo(java.io.OutputStream msgStream, java.lang.String[] ignoreList) throws java.io.IOException, MessagingException
MimeMessage
writeTo
in class MimeMessage
java.io.IOException
- if an error occurs writing to the stream or in
the data handler layer
MessagingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |