Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.mail.Folder
gnu.mail.providers.imap.IMAPFolder
public class IMAPFolder
extends Folder
Field Summary | |
protected char | |
protected int | |
protected int | |
protected String |
|
protected Flags | |
protected int |
|
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 |
|
Folder |
|
protected IMAPFolder |
|
String |
|
Message |
|
int |
|
String |
|
int |
|
Folder |
|
Flags |
|
char |
|
int |
|
boolean |
|
boolean |
|
Folder[] |
|
Folder[] |
|
void |
|
boolean | |
Message[] |
|
Message[] |
|
protected char delimiter
protected int messageCount
protected int newMessageCount
protected String path
The folder path.
protected int type
The type of this folder (HOLDS_MESSAGES or HOLDS_FOLDERS).
public void appendMessages(Message messages) throws MessagingException
Appends the specified set of messages to this folder. OnlyMimeMessage
s are accepted.
- Overrides:
- appendMessages in interface Folder
public void close(boolean expunge) throws MessagingException
Closes this folder.
- Overrides:
- close in interface Folder
- Parameters:
expunge
- if the folder is to be expunged before it is closed
- Throws:
MessagingException
- if a messaging error occurred
public boolean create(int type) throws MessagingException
Create this folder.
- Overrides:
- create in interface Folder
public boolean delete(boolean flag) throws MessagingException
Delete this folder.
- Overrides:
- delete in interface Folder
public boolean equals(Object other)
public boolean exists() throws MessagingException
Indicates whether this folder exists.
- Overrides:
- exists in interface Folder
- Throws:
MessagingException
- if a messaging error occurred
public Message[] expunge() throws MessagingException
Expunges this folder. This deletes all the messages marked as deleted.
- Overrides:
- expunge in interface Folder
- 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.
- Overrides:
- fetch in interface Folder
public Folder getFolder(String name) throws MessagingException
Returns a subfolder with the specified name.
- Overrides:
- getFolder in interface Folder
protected IMAPFolder getFolder(String name, int type, char delimiter) throws MessagingException
Returns a configured subfolder.
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 int getMessageCount() throws MessagingException
Returns the number of messages in this folder.
- Overrides:
- getMessageCount in interface Folder
- Throws:
MessagingException
- if a messaging error occurred
public String getName()
Returns the name of this folder.
- Overrides:
- getName in interface Folder
public int getNewMessageCount() throws MessagingException
Returns 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.
- Overrides:
- getParent in interface Folder
public Flags getPermanentFlags()
Returns the permanent flags for this folder.
- Overrides:
- getPermanentFlags in interface Folder
public char getSeparator() throws MessagingException
Returns the path separator charcter.
- Overrides:
- getSeparator in interface Folder
public int getType() throws MessagingException
Returns the type of this folder.
- Overrides:
- getType in interface Folder
- Throws:
MessagingException
- if a messaging error occurred
public boolean hasNewMessages() throws MessagingException
Indicates 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.
- Overrides:
- isOpen in interface Folder
public Folder[] list(String pattern) throws MessagingException
Returns the subfolders for this folder.
- Overrides:
- list in interface 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 MessagingException
Opens this folder.
- Overrides:
- open in interface Folder
- Throws:
MessagingException
- if a messaging error occurred
public boolean renameTo(Folder folder) throws MessagingException
Rename this folder.
- Overrides:
- renameTo in interface Folder
public Message[] search(SearchTerm term) throws MessagingException
IMAP search function.
- Overrides:
- search in interface Folder
public Message[] search(SearchTerm term, Message msgs) throws MessagingException
IMAP search function.
- Overrides:
- search in interface Folder