|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.Folder
gnu.mail.providers.maildir.MaildirFolder
public final class MaildirFolder
The folder class implementing a Maildir-format mailbox.
Field Summary |
---|
Fields inherited from class javax.mail.Folder |
---|
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store |
Constructor Summary | |
---|---|
protected |
MaildirFolder(Store store,
String filename)
Constructor. |
protected |
MaildirFolder(Store store,
String filename,
boolean root,
boolean inbox)
Constructor. |
Method Summary | |
---|---|
void |
appendMessages(Message[] m)
Appends messages to this folder. |
void |
close(boolean expunge)
Closes this folder. |
boolean |
create(int type)
Creates this folder in the store. |
boolean |
delete(boolean recurse)
Deletes this folder. |
boolean |
exists()
Indicates whether this folder exists. |
Message[] |
expunge()
Expunges this folder. |
Folder |
getFolder(String filename)
Returns the subfolder of this folder with the specified name. |
String |
getFullName()
Returns the full name of this folder. |
Message |
getMessage(int msgnum)
Returns the specified message number from this folder. |
int |
getMessageCount()
Returns the number of messages in this folder. |
Message[] |
getMessages()
Returns the messages in this folder. |
String |
getName()
Returns the name of this folder. |
int |
getNewMessageCount()
Returns the number of new messages in this folder. |
Folder |
getParent()
Returns the parent folder. |
Flags |
getPermanentFlags()
Returns the permanent flags for this folder. |
char |
getSeparator()
Returns the separator character. |
int |
getType()
Returns the type of this folder. |
URLName |
getURLName()
Return a URLName representing this folder. |
boolean |
hasNewMessages()
Indicates whether this folder contains new messages. |
boolean |
isOpen()
Indicates whether this folder is open. |
Folder[] |
list()
Returns the subfolders of this folder. |
Folder[] |
list(String pattern)
Returns the subfolders of this folder matching the specified pattern. |
void |
open(int mode)
Opens this folder. |
boolean |
renameTo(Folder folder)
Renames this folder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected MaildirFolder(Store store, String filename, boolean root, boolean inbox)
protected MaildirFolder(Store store, String filename)
Method Detail |
---|
public String getName()
getName
in class Folder
public String getFullName()
getFullName
in class Folder
public URLName getURLName() throws MessagingException
getURLName
in class Folder
MessagingException
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_WRITE
MessagingException
- 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 closed
MessagingException
- if a messaging error occurredpublic Message[] expunge() throws MessagingException
expunge
in class Folder
MessagingException
- if a messaging error occurredpublic boolean isOpen()
isOpen
in class Folder
public Flags getPermanentFlags()
getPermanentFlags
in class Folder
public int getMessageCount() throws MessagingException
getMessageCount
in class Folder
MessagingException
- if a messaging error occurredpublic int getNewMessageCount() throws MessagingException
getNewMessageCount
in class Folder
MessagingException
- if a messaging error occurredpublic Message getMessage(int msgnum) throws MessagingException
getMessage
in class Folder
msgnum
- the message number
MessagingException
- if a messaging error occurredpublic Message[] getMessages() throws MessagingException
getMessages
in class Folder
MessagingException
- if a messaging error occurredpublic void appendMessages(Message[] m) throws MessagingException
appendMessages
in class Folder
m
- an array of messages to be appended
FolderNotFoundException
- if this folder does not exist
MessagingException
- if the append operation failedpublic Folder getParent() throws MessagingException
getParent
in class Folder
MessagingException
public Folder[] list() throws MessagingException
list
in class Folder
MessagingException
public Folder[] list(String pattern) throws MessagingException
list
in class Folder
pattern
- the match pattern
MessagingException
public char getSeparator() throws MessagingException
getSeparator
in class Folder
MessagingException
public boolean create(int type) throws MessagingException
create
in class Folder
type
- the desired type of the folder
MessagingException
public boolean delete(boolean recurse) throws MessagingException
delete
in class Folder
recurse
- delete any subfolders
FolderNotFoundException
- if this folder does not exist
MessagingException
public boolean renameTo(Folder folder) throws MessagingException
renameTo
in class Folder
folder
- a folder representing the new name for this folder
FolderNotFoundException
- if this folder does not exist
MessagingException
public Folder getFolder(String filename) throws MessagingException
getFolder
in class Folder
filename
- the name of the folder
MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |