gnu.mail.providers.pop3

Class POP3Message

Implemented Interfaces:
MimePart, Part

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

The message class implementing the POP3 mail protocol.
Version:
1.2
Authors:
Chris Burdess
Nic Ferrier

Nested Class Summary

Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage

MimeMessage.RecipientType

Nested classes/interfaces inherited from class javax.mail.Message

Message.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

Enumeration
getAllHeaderLines()
Causes the headers to be read.
Enumeration
getAllHeaders()
Causes the headers to be read.
protected InputStream
getContentStream()
Causes the content to be read in.
DataHandler
getDataHandler()
Causes the content to be read in.
String[]
getHeader(String name)
Causes the headers to be read.
String
getHeader(String name, String delimiter)
Causes the headers to be read.
Enumeration
getMatchingHeaderLines(String[] names)
Causes the headers to be read.
Enumeration
getMatchingHeaders(String[] names)
Causes the headers to be read.
Enumeration
getNonMatchingHeaderLines(String[] names)
Causes the headers to be read.
Enumeration
getNonMatchingHeaders(String[] names)
Causes the headers to be read.
int
getSize()
Gets the size of the message.
String
getUID()
Returns the unique ID for this message.
void
setFlags(Flags flags, boolean set)
Set flags (but only DELETED is supported) add or remove the message from the folder deleted message list.
void
writeTo(OutputStream msgStream)
Writes this message to the specified stream in RFC 822 format.
void
writeTo(OutputStream msgStream, 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, setFlags, setHeader

Methods inherited from class javax.mail.internet.MimeMessage

addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, 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, setText, updateHeaders, updateMessageId, writeTo, writeTo

Methods inherited from class javax.mail.Message

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

Method Details

getAllHeaderLines

public Enumeration getAllHeaderLines()
            throws MessagingException
Causes the headers to be read.
Specified by:
getAllHeaderLines in interface MimePart
Overrides:
getAllHeaderLines in interface MimeMessage

getAllHeaders

public Enumeration getAllHeaders()
            throws MessagingException
Causes the headers to be read.
Specified by:
getAllHeaders in interface Part
Overrides:
getAllHeaders in interface MimeMessage

getContentStream

protected InputStream getContentStream()
            throws MessagingException
Causes the content to be read in.
Overrides:
getContentStream in interface MimeMessage

getDataHandler

public DataHandler getDataHandler()
            throws MessagingException
Causes the content to be read in.
Specified by:
getDataHandler in interface Part
Overrides:
getDataHandler in interface MimeMessage

getHeader

public String[] getHeader(String name)
            throws MessagingException
Causes the headers to be read.
Specified by:
getHeader in interface Part
Overrides:
getHeader in interface MimeMessage

getHeader

public String getHeader(String name,
                        String delimiter)
            throws MessagingException
Causes the headers to be read.
Specified by:
getHeader in interface MimePart
Overrides:
getHeader in interface MimeMessage

getMatchingHeaderLines

public Enumeration getMatchingHeaderLines(String[] names)
            throws MessagingException
Causes the headers to be read.
Specified by:
getMatchingHeaderLines in interface MimePart
Overrides:
getMatchingHeaderLines in interface MimeMessage

getMatchingHeaders

public Enumeration getMatchingHeaders(String[] names)
            throws MessagingException
Causes the headers to be read.
Specified by:
getMatchingHeaders in interface Part
Overrides:
getMatchingHeaders in interface MimeMessage

getNonMatchingHeaderLines

public Enumeration getNonMatchingHeaderLines(String[] names)
            throws MessagingException
Causes the headers to be read.
Specified by:
getNonMatchingHeaderLines in interface MimePart
Overrides:
getNonMatchingHeaderLines in interface MimeMessage

getNonMatchingHeaders

public Enumeration getNonMatchingHeaders(String[] names)
            throws MessagingException
Causes the headers to be read.
Specified by:
getNonMatchingHeaders in interface Part
Overrides:
getNonMatchingHeaders in interface MimeMessage

getSize

public int getSize()
            throws MessagingException
Gets the size of the message. Uses the cached size if it's available to us.
Specified by:
getSize in interface Part
Overrides:
getSize in interface MimeMessage

getUID

public String getUID()
            throws MessagingException
Returns the unique ID for this message.

setFlags

public void setFlags(Flags flags,
                     boolean set)
            throws MessagingException
Set flags (but only DELETED is supported) add or remove the message from the folder deleted message list.
Overrides:
setFlags in interface gnu.mail.providers.ReadOnlyMessage

writeTo

public void writeTo(OutputStream msgStream)
            throws IOException,
                   MessagingException
Writes this message to the specified stream in RFC 822 format.
Specified by:
writeTo in interface Part
Overrides:
writeTo in interface MimeMessage

writeTo

public void writeTo(OutputStream msgStream,
                    String[] ignoreList)
            throws IOException,
                   MessagingException
Writes this message to the specified stream in RFC 822 format, without the specified headers.
Overrides:
writeTo in interface MimeMessage

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