| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class POP3Folder extends Folder
A POP3 Folder (can only be "INBOX"). See the com.sun.mail.pop3 package documentation for further information on the POP3 protocol provider.
Field Summary |
---|
Fields inherited from class javax.mail.Folder |
---|
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store |
Method Summary | |
---|---|
void |
appendMessages(Message[] msgs) Always throws MethodNotSupportedException
because the POP3 protocol doesn't support appending messages.
|
void |
close(boolean expunge) Close this Folder. |
boolean |
create(int type) Always returns false ; the POP3 protocol doesn't
support creating folders.
|
protected POP3Message |
createMessage(Folder f, int msgno) |
boolean |
delete(boolean recurse) Always throws MethodNotSupportedException
because the POP3 protocol doesn't allow the INBOX to
be deleted.
|
boolean |
exists() Always true for the folder "INBOX", always false for any other name. |
Message[] |
expunge() Always throws MethodNotSupportedException
because the POP3 protocol doesn't support expunging messages
without closing the folder; call the com.sun.mail.pop3.POP3Folder.close method
with the expunge argument set to true
instead.
|
void |
fetch(Message[] msgs, FetchProfile fp) Prefetch information about POP3 messages. |
protected void |
finalize() Close the folder when we're finalized. |
Folder |
Always throws MessagingException because no POP3 folders
can contain subfolders.
|
String |
Returns the full name of this Folder. |
Message |
getMessage(int msgno) Get the Message object corresponding to the given message number. |
int |
Will not change while the folder is open because the POP3 protocol doesn't support notification of new messages arriving in open folders. |
String |
getName() Returns the name of this Folder. |
Folder |
Returns the parent folder of this folder. |
Flags |
Always returns an empty Flags object because
the POP3 protocol doesn't support any permanent flags.
|
char |
Always returns a NUL character because POP3 doesn't support a hierarchy. |
int |
getSize() Return the size of this folder, as was returned by the POP3 STAT command when this folder was opened. |
int[] |
getSizes() Return the sizes of all messages in this folder, as returned by the POP3 LIST command. |
int |
getType() Always returns Folder.HOLDS_MESSAGES. |
String |
Return the unique ID string for this message, or null if not available. |
boolean |
Always returns false ; the POP3 protocol provides
no way to determine when a new message arrives.
|
boolean |
isOpen() Indicates whether this Folder is in the 'open' state. |
Folder[] |
Always throws MessagingException because no POP3 folders
can contain subfolders.
|
InputStream |
Return the raw results of the POP3 LIST command with no arguments. |
protected void |
notifyMessageChangedListeners(int type, Message m) Notify all MessageChangedListeners. |
void |
open(int mode) Throws FolderNotFoundException unless this
folder is named "INBOX".
|
boolean |
Always throws MethodNotSupportedException
because the POP3 protocol doesn't support multiple folders.
|
Method Detail |
---|
public void appendMessages(Message[] msgs) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support appending messages.
appendMessages
in class Folder
msgs
MessagingException
public synchronized void close(boolean expunge) throws MessagingException
close
in class Folder
expunge
MessagingException
public boolean create(int type) throws MessagingException
false
; the POP3 protocol doesn't
support creating folders.
create
in class Folder
type
MessagingException
protected POP3Message createMessage(Folder f, int msgno) throws MessagingException
f
msgno
MessagingException
public boolean delete(boolean recurse) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't allow the INBOX to
be deleted.
delete
in class Folder
recurse
MessagingException
public boolean exists()
exists
in class Folder
public Message[] expunge() throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support expunging messages
without closing the folder; call the {@link #close close} method
with the expunge
argument set to true
instead.
expunge
in class Folder
MessagingException
public synchronized void fetch(Message[] msgs, FetchProfile fp) throws MessagingException
UIDFolder.FetchProfileItem.UID
,
POP3 UIDs for all messages in the folder are fetched using the POP3
UIDL command.
If the FetchProfile contains FetchProfile.Item.ENVELOPE
,
the headers and size of all messages are fetched using the POP3 TOP
and LIST commands.
fetch
in class Folder
msgs
fp
MessagingException
protected void finalize() throws Throwable
finalize
in class Folder
Throwable
public Folder getFolder(String name) throws MessagingException
MessagingException
because no POP3 folders
can contain subfolders.
getFolder
in class Folder
name
MessagingException
- alwayspublic String getFullName()
getFullName
in class Folder
public synchronized Message getMessage(int msgno) throws MessagingException
getMessage
in class Folder
msgno
MessagingException
public synchronized int getMessageCount() throws MessagingException
getMessageCount
in class Folder
MessagingException
public String getName()
getName
in class Folder
public Folder getParent()
getParent
in class Folder
public Flags getPermanentFlags()
Flags
object because
the POP3 protocol doesn't support any permanent flags.
getPermanentFlags
in class Folder
public char getSeparator()
getSeparator
in class Folder
public synchronized int getSize() throws MessagingException
MessagingException
public synchronized int[] getSizes() throws MessagingException
MessagingException
public int getType()
getType
in class Folder
public synchronized String getUID(Message msg) throws MessagingException
msg
MessagingException
public boolean hasNewMessages() throws MessagingException
false
; the POP3 protocol provides
no way to determine when a new message arrives.
hasNewMessages
in class Folder
MessagingException
public boolean isOpen()
isOpen
in class Folder
public Folder[] list(String pattern) throws MessagingException
MessagingException
because no POP3 folders
can contain subfolders.
list
in class Folder
pattern
MessagingException
- alwayspublic synchronized InputStream listCommand() throws MessagingException, IOException
MessagingException
IOException
protected void notifyMessageChangedListeners(int type, Message m)
notifyMessageChangedListeners
in class Folder
type
m
public synchronized void open(int mode) throws MessagingException
FolderNotFoundException
unless this
folder is named "INBOX".
open
in class Folder
mode
MessagingException
- other open failurespublic boolean renameTo(Folder f) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support multiple folders.
renameTo
in class Folder
f
MessagingException
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |