Java javax.mail Folder fields, constructors, methods, implement or subclass

Example usage for Java javax.mail Folder fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.mail Folder.

The text is from its open source code.

Subclass

javax.mail.Folder has subclasses.
Click this link to see all its subclasses.

Field

intHOLDS_MESSAGES
This folder can contain messages
intHOLDS_FOLDERS
This folder can contain other folders
intREAD_ONLY
The Folder is read only.
intREAD_WRITE
The state and contents of this folder can be modified.

Method

voidaddMessageCountListener(MessageCountListener l)
Add a listener for MessageCount events on this Folder.
voidappendMessages(Message[] msgs)
Append given Messages to this folder.
voidclose(boolean expunge)
Close this Folder.
voidcopyMessages(Message[] msgs, Folder folder)
Copy the specified Messages from this Folder into another Folder.
booleancreate(int type)
Create this folder on the Store.
booleandelete(boolean recurse)
Delete this Folder.
booleanexists()
Tests if this folder physically exists on the Store.
Message[]expunge()
Expunge (permanently remove) messages marked DELETED.
voidfetch(Message[] msgs, FetchProfile fp)
Prefetch the items specified in the FetchProfile for the given Messages.
FoldergetFolder(String name)
Return the Folder object corresponding to the given name.
StringgetFullName()
Returns the full name of this Folder.
MessagegetMessage(int msgnum)
Get the Message object corresponding to the given message number.
intgetMessageCount()
Get total number of messages in this Folder.
Message[]getMessages()
Get all Message objects from this Folder.
Message[]getMessages(int start, int end)
Get the Message objects for message numbers ranging from start through end, both start and end inclusive.
Message[]getMessages(int[] msgnums)
Get the Message objects for message numbers specified in the array.
intgetMode()
Return the open mode of this folder.
StringgetName()
Returns the name of this Folder.
intgetNewMessageCount()
Get the number of new messages in this Folder.
FoldergetParent()
Returns the parent folder of this folder.
FlagsgetPermanentFlags()
Get the permanent flags supported by this Folder.
chargetSeparator()
Return the delimiter character that separates this Folder's pathname from the names of immediate subfolders.
StoregetStore()
Returns the Store that owns this Folder object.
intgetType()
Returns the type of this Folder, that is, whether this folder can hold messages or subfolders or both.
intgetUnreadMessageCount()
Get the total number of unread messages in this Folder.
URLNamegetURLName()
Return a URLName representing this folder.
inthashCode()
Returns a hash code value for the object.
booleanhasNewMessages()
Returns true if this Folder has new messages since the last time this indication was reset.
booleanisOpen()
Indicates whether this Folder is in the 'open' state.
booleanisSubscribed()
Returns true if this Folder is subscribed.
Folder[]list(String pattern)
Returns a list of Folders belonging to this Folder's namespace that match the specified pattern.
Folder[]list()
Convenience method that returns the list of folders under this Folder.
voidopen(int mode)
Open this Folder.
booleanrenameTo(Folder f)
Rename this Folder.
Message[]search(SearchTerm term)
Search this Folder for messages matching the specified search criterion.
voidsetFlags(Message[] msgs, Flags flag, boolean value)
Set the specified flags on the messages specified in the array.
voidsetFlags(int[] msgnums, Flags flag, boolean value)
Set the specified flags on the messages whose message numbers are in the array.
voidsetFlags(int start, int end, Flags flag, boolean value)
Set the specified flags on the messages numbered from start through end, both start and end inclusive.
voidsetSubscribed(boolean subscribe)
Subscribe or unsubscribe this Folder.
StringtoString()
override the default toString(), it will return the String from Folder.getFullName() or if that is null, it will use the default toString() behavior.