| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectjavax.mail.Foldergnu.mail.providers.imap.IMAPFolderField Summary | |
protected char | |
protected int | |
protected int | |
protected String |
|
protected Flags | |
protected boolean | |
protected int |
|
protected long | |
Fields inherited from class javax.mail.Folder | |
HOLDS_FOLDERS, HOLDS_MESSAGES, READ_ONLY, READ_WRITE, mode, store | |
Constructor Summary | |
| |
| |
| |
Method Summary | |
void |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
Message[] |
|
void |
|
int |
|
Folder |
|
String |
|
Message |
|
Message |
|
int |
|
int |
|
Message[] |
|
Message[] |
|
String |
|
int |
|
Folder |
|
Flags |
|
Quota[] |
|
char |
|
int |
|
long | |
long |
|
int |
|
boolean |
|
boolean |
|
boolean |
|
Folder[] |
|
Folder[] |
|
void |
|
boolean | |
Message[] |
|
Message[] |
|
void |
|
protected char delimiter
protected int messageCount
protected int newMessageCount
protected String path
The folder path.
protected boolean subscribed
protected int type
The type of this folder(HOLDS_MESSAGES or HOLDS_FOLDERS).
protected long uidValidity
public void appendMessages(Message[] messages) throws MessagingException
Appends the specified set of messages to this folder. OnlyMimeMessages are accepted.
- Overrides:
- appendMessages in interface Folder
public void close(boolean expunge)
throws MessagingExceptionCloses this folder.
- Parameters:
expunge- if the folder is to be expunged before it is closed
- Throws:
MessagingException- if a messaging error occurred
public boolean equals(Object other)
public boolean exists()
throws MessagingExceptionIndicates whether this folder exists.
- Throws:
MessagingException- if a messaging error occurred
public Message[] expunge() throws MessagingException
Expunges this folder. This deletes all the messages marked as deleted.
- Throws:
MessagingException- if a messaging error occurred
public void fetch(Message[] messages, FetchProfile fp) throws MessagingException
IMAP fetch routine. This executes the fetch for the specified message numbers and updates the messages according to the message statuses returned.
public int getDeletedMessageCount()
throws MessagingExceptionReturns the number of deleted messages in this folder.
- Overrides:
- getDeletedMessageCount in interface Folder
- See Also:
Folder.getDeletedMessageCount()
public Folder getFolder(String name) throws MessagingException
Returns a subfolder with the specified name.
public String getFullName()
Returns the full path of this folder.
- Overrides:
- getFullName in interface Folder
public Message getMessage(int msgnum) throws MessagingException
Returns the specified message number from this folder. The message is only retrieved once from the server. Subsequent getMessage() calls to the same message are cached. Since POP3 does not provide a mechanism for retrieving only part of the message(headers, etc), the entire message is retrieved.
- Overrides:
- getMessage in interface Folder
- Throws:
MessagingException- if a messaging error occurred
public Message getMessageByUID(long uid) throws MessagingException
Returns the message corresponding to the given UID, ornullif no such message exists.
- Specified by:
- getMessageByUID in interface UIDFolder
- Parameters:
uid- the UID of the desired message
public int getMessageCount()
throws MessagingExceptionReturns the number of messages in this folder.
- Overrides:
- getMessageCount in interface Folder
- Throws:
MessagingException- if a messaging error occurred
public int getMessageCountByCriteria(String criteria)
throws MessagingExceptionConvenience method for returning the number of messages in the current folder that match the single criteria.
public Message[] getMessagesByUID(long start, long end) throws MessagingException
Returns the messages in the given range. The special value LASTUID can be used as theendparameter to indicate the last available UID.
- Specified by:
- getMessagesByUID in interface UIDFolder
- Parameters:
start- the start UIDend- the end UID
public Message[] getMessagesByUID(long[] uids) throws MessagingException
Returns the messages specified by the given UIDs. If any UID is invalid,nullis returned for that entry. The returned array will be of the same size as the specified UIDs.
- Specified by:
- getMessagesByUID in interface UIDFolder
- Parameters:
uids- the UIDs
public String getName()
Returns the name of this folder.
public int getNewMessageCount()
throws MessagingExceptionReturns the number of new messages in this folder.
- Overrides:
- getNewMessageCount in interface Folder
- Throws:
MessagingException- if a messaging error occurred
public Folder getParent() throws MessagingException
Returns the parent folder of this folder.
public Flags getPermanentFlags()
Returns the permanent flags for this folder.
- Overrides:
- getPermanentFlags in interface Folder
public char getSeparator()
throws MessagingExceptionReturns the path separator charcter.
- Overrides:
- getSeparator in interface Folder
public int getType()
throws MessagingExceptionReturns the type of this folder.
- Throws:
MessagingException- if a messaging error occurred
public long getUID(Message message) throws MessagingException
Returns the UID for the specified message.
- Parameters:
message- a message in this folder
public long getUIDValidity()
throws MessagingExceptionReturns the UIDValidity value associated with this folder. A client should compare this value against a UIDValidity value saved from a previous session to ensure that any cached UIDs are valid.
- Specified by:
- getUIDValidity in interface UIDFolder
public int getUnreadMessageCount()
throws MessagingExceptionReturns the number of unread messages in this folder.
- Overrides:
- getUnreadMessageCount in interface Folder
- See Also:
Folder.getUnreadMessageCount()
public boolean hasNewMessages()
throws MessagingExceptionIndicates whether this folder contains new messages.
- Overrides:
- hasNewMessages in interface Folder
- Throws:
MessagingException- if a messaging error occurred
public boolean isOpen()
Indicates whether this folder is open.
public boolean isSubscribed()
Indicates whether this folder is subscribed. This method can be invoked on a closed folder.
- Overrides:
- isSubscribed in interface Folder
public Folder[] list(String pattern) throws MessagingException
Returns the subfolders for this folder.
public Folder[] listSubscribed(String pattern) throws MessagingException
Returns the subscribed subfolders for this folder.
- Overrides:
- listSubscribed in interface Folder
public void open(int mode)
throws MessagingExceptionOpens this folder.
- Throws:
MessagingException- if a messaging error occurred
public Message[] search(SearchTerm term, Message[] msgs) throws MessagingException
IMAP search function.
public void setSubscribed(boolean flag)
throws MessagingExceptionSubscribe to or unsubscribe from this folder. Not all Stores support subscription. This method can be invoked on a closed folder.
- Overrides:
- setSubscribed in interface Folder