public final class POP3Folder extends Folder
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store
Modifier | Constructor and Description |
---|---|
protected |
POP3Folder(Store store,
int type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
appendMessages(Message[] messages)
You can't append messages to a POP3 folder.
|
void |
close(boolean expunge)
Closes this folder.
|
boolean |
create(int i)
POP3 folders can't be created, deleted, or renamed.
|
boolean |
delete(boolean flag)
POP3 folders can't be created, deleted, or renamed.
|
boolean |
exists()
Indicates whether this folder exists.
|
Message[] |
expunge()
Expunges this folder.
|
void |
fetch(Message[] messages,
FetchProfile fp)
Fetches headers and/or content for the specified messages.
|
Folder |
getFolder(java.lang.String s)
POP3 folders can't contain subfolders.
|
java.lang.String |
getFullName()
Returns the full name of this folder.
|
Message |
getMessage(int msgnum)
Returns the specified message from this folder.
|
int |
getMessageCount()
Returns the number of messages in this folder.
|
java.lang.String |
getName()
Returns the name of this folder.
|
Folder |
getParent()
POP3 folders can't have parents.
|
Flags |
getPermanentFlags()
Returns the permanent flags for this folder.
|
char |
getSeparator()
Returns the path separator charcter.
|
int |
getType()
Returns the type of this folder.
|
java.lang.String |
getUID(Message message)
Returns the unique ID for the given message, or
null if
not available. |
boolean |
hasNewMessages()
Indicates whether this folder contains new messages.
|
boolean |
isOpen()
Indicates whether this folder is open.
|
Folder[] |
list()
Returns the subfolders for this folder.
|
Folder[] |
list(java.lang.String pattern)
Returns the subfolders for this folder.
|
void |
open(int mode)
Opens this folder.
|
boolean |
renameTo(Folder folder)
POP3 folders can't be created, deleted, or renamed.
|
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, getDeletedMessageCount, getMessages, getMessages, getMessages, getMode, getNewMessageCount, getStore, getUnreadMessageCount, getURLName, isSubscribed, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toString
protected POP3Folder(Store store, int type)
public java.lang.String getName()
public java.lang.String getFullName()
getFullName
in class Folder
public int getType() throws MessagingException
getType
in class Folder
MessagingException
- if a messaging error occurredpublic boolean exists() throws MessagingException
exists
in class Folder
MessagingException
- if a messaging error occurredpublic boolean hasNewMessages() throws MessagingException
hasNewMessages
in class Folder
MessagingException
- if a messaging error occurredpublic void open(int mode) throws MessagingException
open
in class Folder
mode
- open the Folder READ_ONLY or READ_WRITEMessagingException
- if a messaging error occurredpublic void close(boolean expunge) throws MessagingException
close
in class Folder
expunge
- if the folder is to be expunged before it is closedMessagingException
- if a messaging error occurredpublic Message[] expunge() throws MessagingException
expunge
in class Folder
MessagingException
- if a messaging error occurredpublic boolean isOpen()
public Flags getPermanentFlags()
getPermanentFlags
in class Folder
public int getMessageCount() throws MessagingException
getMessageCount
in class Folder
MessagingException
- if a messaging error occurredpublic Message getMessage(int msgnum) throws MessagingException
getMessage
in class Folder
msgnum
- the message numberMessagingException
- if a messaging error occurredpublic void appendMessages(Message[] messages) throws MessagingException
appendMessages
in class Folder
messages
- array of messages to be appendedFolderNotFoundException
- if this folder does not existMessagingException
- if the append operation failedpublic void fetch(Message[] messages, FetchProfile fp) throws MessagingException
fetch
in class Folder
messages
- the messages to fetch the items forfp
- the fetch profileMessagingException
- ignorepublic Folder[] list() throws MessagingException
list
in class Folder
MessagingException
public Folder[] list(java.lang.String pattern) throws MessagingException
list
in class Folder
pattern
- the match patternMessagingException
public Folder getParent() throws MessagingException
getParent
in class Folder
MessagingException
public Folder getFolder(java.lang.String s) throws MessagingException
getFolder
in class Folder
s
- the name of the folderMessagingException
public char getSeparator() throws MessagingException
getSeparator
in class Folder
MessagingException
public boolean create(int i) throws MessagingException
create
in class Folder
i
- the desired type of the folderMessagingException
public boolean delete(boolean flag) throws MessagingException
delete
in class Folder
flag
- delete any subfoldersFolderNotFoundException
- if this folder does not existMessagingException
public boolean renameTo(Folder folder) throws MessagingException
renameTo
in class Folder
folder
- a folder representing the new name for this folderFolderNotFoundException
- if this folder does not existMessagingException
public java.lang.String getUID(Message message) throws MessagingException
null
if
not available.message
- the messageMessagingException