|
||||||||||
| 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
com.sun.mail.pop3.POP3Message
public class POP3Message
A POP3 Message. Just like a MimeMessage except that some things are not supported.
| 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, msgnum, session |
| Fields inherited from interface javax.mail.Part |
|---|
ATTACHMENT, INLINE |
| Constructor Summary | |
|---|---|
POP3Message(Folder folder,
int msgno)
|
|
| Method Summary | |
|---|---|
void |
addHeader(java.lang.String name,
java.lang.String value)
Add this value to the existing values for this header_name. |
void |
addHeaderLine(java.lang.String line)
Add a raw RFC822 header-line. |
java.util.Enumeration |
getAllHeaderLines()
Get all header lines as an Enumeration of Strings. |
java.util.Enumeration |
getAllHeaders()
Return all the headers from this Message as an enumeration of Header objects. |
protected java.io.InputStream |
getContentStream()
Produce the raw bytes of the content. |
java.lang.String[] |
getHeader(java.lang.String name)
Get all the headers for this header_name. |
java.lang.String |
getHeader(java.lang.String name,
java.lang.String delimiter)
Get all the headers for this header name, returned as a single String, with headers separated by the delimiter. |
java.util.Enumeration |
getMatchingHeaderLines(java.lang.String[] names)
Get matching header lines as an Enumeration of Strings. |
java.util.Enumeration |
getMatchingHeaders(java.lang.String[] names)
Return matching headers from this Message as an Enumeration of Header objects. |
java.util.Enumeration |
getNonMatchingHeaderLines(java.lang.String[] names)
Get non-matching header lines as an Enumeration of Strings. |
java.util.Enumeration |
getNonMatchingHeaders(java.lang.String[] names)
Return non-matching headers from this Message as an Enumeration of Header objects. |
int |
getSize()
Return the size of the content of this message in bytes. |
void |
invalidate(boolean invalidateHeaders)
Invalidate the cache of content for this message object, causing it to be fetched again from the server the next time it is needed. |
void |
removeHeader(java.lang.String name)
Remove all headers with this name. |
void |
saveChanges()
POP3 message can't be changed. |
void |
setFlags(Flags newFlags,
boolean set)
Set the specified flags on this message to the specified value. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Set the value for this header_name. |
java.io.InputStream |
top(int n)
Fetch the header of the message and the first n lines
of the raw content of the message. |
| 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 |
| Constructor Detail |
|---|
public POP3Message(Folder folder,
int msgno)
throws MessagingException
MessagingException| Method Detail |
|---|
public void setFlags(Flags newFlags,
boolean set)
throws MessagingException
setFlags in class MimeMessagenewFlags - the flags to be setset - the value to be set
MessagingException
IllegalWriteException - if the underlying
implementation does not support modification
of existing values.MessageChangedEvent
public int getSize()
throws MessagingException
Note that this number may not be an exact measure of the content size and may or may not account for any transfer encoding of the content.
getSize in interface PartgetSize in class MimeMessageMessagingException
protected java.io.InputStream getContentStream()
throws MessagingException
getContentStream in class MimeMessageMessagingExceptionMimeMessage.contentStreampublic void invalidate(boolean invalidateHeaders)
invalidateHeaders is true, invalidate the headers
as well.
invalidateHeaders - invalidate the headers as well?
public java.io.InputStream top(int n)
throws MessagingException
n lines
of the raw content of the message. The headers and data are
available in the returned InputStream.
n - number of lines of content to fetch
MessagingException
public java.lang.String[] getHeader(java.lang.String name)
throws MessagingException
getHeader in interface PartgetHeader in class MimeMessagename - name of header
MessagingExceptionMimeUtility
public java.lang.String getHeader(java.lang.String name,
java.lang.String delimiter)
throws MessagingException
null, only the first header is
returned.
getHeader in interface MimePartgetHeader in class MimeMessagename - the name of this headerdelimiter - delimiter between returned headers
MessagingException
public void setHeader(java.lang.String name,
java.lang.String value)
throws MessagingException
setHeader in interface PartsetHeader in class MimeMessagename - header namevalue - header value
IllegalWriteException - because the underlying
implementation does not support modification
java.lang.IllegalStateException - if this message is
obtained from a READ_ONLY folder.
MessagingExceptionMimeUtility
public void addHeader(java.lang.String name,
java.lang.String value)
throws MessagingException
addHeader in interface PartaddHeader in class MimeMessagename - header namevalue - header value
IllegalWriteException - because the underlying
implementation does not support modification
java.lang.IllegalStateException - if this message is
obtained from a READ_ONLY folder.
MessagingExceptionMimeUtility
public void removeHeader(java.lang.String name)
throws MessagingException
removeHeader in interface PartremoveHeader in class MimeMessagename - the name of this header
IllegalWriteException - because the underlying
implementation does not support modification
java.lang.IllegalStateException - if this message is
obtained from a READ_ONLY folder.
MessagingException
public java.util.Enumeration getAllHeaders()
throws MessagingException
Note that certain headers may be encoded as per RFC 2047 if they contain non US-ASCII characters and these should be decoded.
getAllHeaders in interface PartgetAllHeaders in class MimeMessageMessagingExceptionMimeUtility
public java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
throws MessagingException
getMatchingHeaders in interface PartgetMatchingHeaders in class MimeMessageMessagingException
public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
throws MessagingException
getNonMatchingHeaders in interface PartgetNonMatchingHeaders in class MimeMessageMessagingException
public void addHeaderLine(java.lang.String line)
throws MessagingException
addHeaderLine in interface MimePartaddHeaderLine in class MimeMessageIllegalWriteException - because the underlying
implementation does not support modification
java.lang.IllegalStateException - if this message is
obtained from a READ_ONLY folder.
MessagingException
public java.util.Enumeration getAllHeaderLines()
throws MessagingException
getAllHeaderLines in interface MimePartgetAllHeaderLines in class MimeMessageMessagingException
public java.util.Enumeration getMatchingHeaderLines(java.lang.String[] names)
throws MessagingException
getMatchingHeaderLines in interface MimePartgetMatchingHeaderLines in class MimeMessageMessagingException
public java.util.Enumeration getNonMatchingHeaderLines(java.lang.String[] names)
throws MessagingException
getNonMatchingHeaderLines in interface MimePartgetNonMatchingHeaderLines in class MimeMessageMessagingException
public void saveChanges()
throws MessagingException
saveChanges in class MimeMessageIllegalWriteException - because the underlying
implementation does not support modification
MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||