public class MboxFolder extends Folder
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store| Modifier | Constructor and Description |
|---|---|
protected |
MboxFolder(Store store,
File file,
boolean inbox)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock()
Locks this mailbox.
|
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.
|
static String |
decodeFrom(String line)
Returns the specified line with any From_ line encoding removed.
|
boolean |
delete(boolean recurse)
Deletes this folder.
|
boolean |
exists()
Indicates whether this folder exists.
|
Message[] |
expunge()
Expunges this folder.
|
protected String |
fromLine(MboxMessage message)
Returns the From_ line for the specified mbox message.
|
Folder |
getFolder(String name)
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.
|
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 |
releaseLock()
Unlocks this mailbox.
|
boolean |
renameTo(Folder folder)
Renames this folder.
|
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, fetch, getDeletedMessageCount, getMessages, getMessages, getMode, getNewMessageCount, getStore, getUnreadMessageCount, isSubscribed, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toStringpublic String getName()
public String getFullName()
getFullName in class Folderpublic URLName getURLName() throws MessagingException
getURLName in class FolderMessagingExceptionpublic int getType()
throws MessagingException
getType in class FolderMessagingException - if a messaging error occurredpublic boolean exists()
throws MessagingException
exists in class FolderMessagingException - if a messaging error occurredpublic boolean hasNewMessages()
throws MessagingException
hasNewMessages in class FolderMessagingException - if a messaging error occurredpublic void open(int mode)
throws MessagingException
open in class Foldermode - open the Folder READ_ONLY or READ_WRITEMessagingException - if a messaging error occurredpublic static String decodeFrom(String line)
public void close(boolean expunge)
throws MessagingException
close in class Folderexpunge - if the folder is to be expunged before it is closedMessagingException - if a messaging error occurredprotected String fromLine(MboxMessage message) throws MessagingException
MessagingExceptionpublic Message[] expunge() throws MessagingException
expunge in class FolderMessagingException - if a messaging error occurredpublic boolean isOpen()
public Flags getPermanentFlags()
getPermanentFlags in class Folderpublic int getMessageCount()
throws MessagingException
getMessageCount in class FolderMessagingException - if a messaging error occurredpublic Message getMessage(int msgnum) throws MessagingException
getMessage in class Foldermsgnum - the message numberMessagingException - if a messaging error occurredpublic Message[] getMessages() throws MessagingException
getMessages in class FolderMessagingException - if a messaging error occurredpublic void appendMessages(Message[] m) throws MessagingException
appendMessages in class Folderm - an array of messages to be appendedFolderNotFoundException - if this folder does not existMessagingException - if the append operation failedpublic Folder getParent() throws MessagingException
getParent in class FolderMessagingExceptionpublic Folder[] list() throws MessagingException
list in class FolderMessagingExceptionpublic Folder[] list(String pattern) throws MessagingException
list in class Folderpattern - the match patternMessagingExceptionpublic char getSeparator()
throws MessagingException
getSeparator in class FolderMessagingExceptionpublic boolean create(int type)
throws MessagingException
create in class Foldertype - the desired type of the folderMessagingExceptionpublic boolean delete(boolean recurse)
throws MessagingException
delete in class Folderrecurse - delete any subfoldersFolderNotFoundException - if this folder does not existMessagingExceptionpublic boolean renameTo(Folder folder) throws MessagingException
renameTo in class Folderfolder - a folder representing the new name for this folderFolderNotFoundException - if this folder does not existMessagingExceptionpublic Folder getFolder(String name) throws MessagingException
getFolder in class Foldername - the name of the folderMessagingExceptionpublic boolean acquireLock()
public boolean releaseLock()
© Copyright 2003, 2004 The Free Software Foundation, All rights reserved