0,0 → 1,2494 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
<!--NewPage--> |
<HTML> |
<HEAD> |
<!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:37 PST 2009 --> |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
<TITLE> |
Folder (JavaMail API documentation) |
</TITLE> |
|
<META NAME="date" CONTENT="2009-11-17"> |
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> |
|
<SCRIPT type="text/javascript"> |
function windowTitle() |
{ |
if (location.href.indexOf('is-external=true') == -1) { |
parent.document.title="Folder (JavaMail API documentation)"; |
} |
} |
</SCRIPT> |
<NOSCRIPT> |
</NOSCRIPT> |
|
</HEAD> |
|
<BODY BGCOLOR="white" onload="windowTitle();"> |
<HR> |
|
|
<!-- ========= START OF TOP NAVBAR ======= --> |
<A NAME="navbar_top"><!-- --></A> |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
<TR> |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
<A NAME="navbar_top_firstrow"><!-- --></A> |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
<TR ALIGN="center" VALIGN="top"> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Folder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
</TR> |
</TABLE> |
</TD> |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
</EM> |
</TD> |
</TR> |
|
<TR> |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail"><B>PREV CLASS</B></A> |
<A HREF="../../javax/mail/FolderClosedException.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD> |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
<A HREF="../../index.html?javax/mail/Folder.html" target="_top"><B>FRAMES</B></A> |
<A HREF="Folder.html" target="_top"><B>NO FRAMES</B></A> |
<SCRIPT type="text/javascript"> |
<!-- |
if(window==top) { |
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); |
} |
//--> |
</SCRIPT> |
<NOSCRIPT> |
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A> |
</NOSCRIPT> |
|
|
</FONT></TD> |
</TR> |
<TR> |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
</TR> |
</TABLE> |
<A NAME="skip-navbar_top"></A> |
<!-- ========= END OF TOP NAVBAR ========= --> |
|
<HR> |
<!-- ======== START OF CLASS DATA ======== --> |
<H2> |
<FONT SIZE="-1"> |
javax.mail</FONT> |
<BR> |
Class Folder</H2> |
<PRE> |
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javax.mail.Folder</B> |
</PRE> |
<DL> |
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../com/sun/mail/imap/IMAPFolder.html" title="class in com.sun.mail.imap">IMAPFolder</A>, <A HREF="../../com/sun/mail/pop3/POP3Folder.html" title="class in com.sun.mail.pop3">POP3Folder</A></DD> |
</DL> |
<HR> |
<DL> |
<DT><PRE>public abstract class <B>Folder</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> |
</PRE> |
|
<P> |
Folder is an abstract class that represents a folder for mail |
messages. Subclasses implement protocol specific Folders.<p> |
|
Folders can contain Messages, other Folders or both, thus providing |
a tree-like hierarchy rooted at the Store's default folder. (Note |
that some Folder implementations may not allow both Messages and |
other Folders in the same Folder).<p> |
|
The interpretation of folder names is implementation dependent. |
The different levels of hierarchy in a folder's full name |
are separated from each other by the hierarchy delimiter |
character.<p> |
|
The case-insensitive full folder name (that is, the full name |
relative to the default folder for a Store) <strong>INBOX</strong> |
is reserved to mean the "primary folder for this user on this |
server". Not all Stores will provide an INBOX folder, and not |
all users will have an INBOX folder at all times. The name |
<strong>INBOX</strong> is reserved to refer to this folder, |
when it exists, in Stores that provide it. <p> |
|
A Folder object obtained from a Store need not actually exist |
in the backend store. The <code>exists</code> method tests whether |
the folder exists or not. The <code>create</code> method |
creates a Folder. <p> |
|
A Folder is initially in the closed state. Certain methods are valid |
in this state; the documentation for those methods note this. A |
Folder is opened by calling its 'open' method. All Folder methods, |
except <code>open</code>, <code>delete</code> and |
<code>renameTo</code>, are valid in this state. <p> |
|
The only way to get a Folder is by invoking the |
<code>getFolder</code> method on Store, Folder, or Session, or by invoking |
the <code>list</code> or <code>listSubscribed</code> methods |
on Folder. Folder objects returned by the above methods are not |
cached by the Store. Thus, invoking the <code>getFolder</code> method |
with the same folder name multiple times will return distinct Folder |
objects. Likewise for the <code>list</code> and <code>listSubscribed</code> |
methods. <p> |
|
The Message objects within the Folder are cached by the Folder. |
Thus, invoking <code>getMessage(msgno)</code> on the same message number |
multiple times will return the same Message object, until an |
expunge is done on this Folder. <p> |
|
Message objects from a Folder are only valid while a Folder is open |
and should not be accessed after the Folder is closed, even if the |
Folder is subsequently reopened. Instead, new Message objects must |
be fetched from the Folder after the Folder is reopened. <p> |
|
Note that a Message's message number can change within a |
session if the containing Folder is expunged using the expunge |
method. Clients that use message numbers as references to messages |
should be aware of this and should be prepared to deal with |
situation (probably by flushing out existing message number references |
and reloading them). Because of this complexity, it is better for |
clients to use Message objects as references to messages, rather than |
message numbers. Expunged Message objects still have to be |
pruned, but other Message objects in that folder are not affected by the |
expunge. |
<P> |
|
<P> |
<HR> |
|
<P> |
<!-- =========== FIELD SUMMARY =========== --> |
|
<A NAME="field_summary"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
<B>Field Summary</B></FONT></TH> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>static int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#HOLDS_FOLDERS">HOLDS_FOLDERS</A></B></CODE> |
|
<BR> |
This folder can contain other folders</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>static int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#HOLDS_MESSAGES">HOLDS_MESSAGES</A></B></CODE> |
|
<BR> |
This folder can contain messages</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#mode">mode</A></B></CODE> |
|
<BR> |
The open mode of this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>static int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#READ_ONLY">READ_ONLY</A></B></CODE> |
|
<BR> |
The Folder is read only.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>static int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#READ_WRITE">READ_WRITE</A></B></CODE> |
|
<BR> |
The state and contents of this folder can be modified.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#store">store</A></B></CODE> |
|
<BR> |
The parent store.</TD> |
</TR> |
</TABLE> |
|
<!-- ======== CONSTRUCTOR SUMMARY ======== --> |
|
<A NAME="constructor_summary"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
<B>Constructor Summary</B></FONT></TH> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected </CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#Folder(javax.mail.Store)">Folder</A></B>(<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> store)</CODE> |
|
<BR> |
Constructor that takes a Store object.</TD> |
</TR> |
</TABLE> |
|
<!-- ========== METHOD SUMMARY =========== --> |
|
<A NAME="method_summary"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
<B>Method Summary</B></FONT></TH> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#addConnectionListener(javax.mail.event.ConnectionListener)">addConnectionListener</A></B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A> l)</CODE> |
|
<BR> |
Add a listener for Connection events on this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#addFolderListener(javax.mail.event.FolderListener)">addFolderListener</A></B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A> l)</CODE> |
|
<BR> |
Add a listener for Folder events on this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#addMessageChangedListener(javax.mail.event.MessageChangedListener)">addMessageChangedListener</A></B>(<A HREF="../../javax/mail/event/MessageChangedListener.html" title="interface in javax.mail.event">MessageChangedListener</A> l)</CODE> |
|
<BR> |
Add a listener for MessageChanged events on this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#addMessageCountListener(javax.mail.event.MessageCountListener)">addMessageCountListener</A></B>(<A HREF="../../javax/mail/event/MessageCountListener.html" title="interface in javax.mail.event">MessageCountListener</A> l)</CODE> |
|
<BR> |
Add a listener for MessageCount events on this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#appendMessages(javax.mail.Message[])">appendMessages</A></B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs)</CODE> |
|
<BR> |
Append given Messages to this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#close(boolean)">close</A></B>(boolean expunge)</CODE> |
|
<BR> |
Close this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#copyMessages(javax.mail.Message[], javax.mail.Folder)">copyMessages</A></B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs, |
<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder)</CODE> |
|
<BR> |
Copy the specified Messages from this Folder into another |
Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#create(int)">create</A></B>(int type)</CODE> |
|
<BR> |
Create this folder on the Store.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#delete(boolean)">delete</A></B>(boolean recurse)</CODE> |
|
<BR> |
Delete this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#exists()">exists</A></B>()</CODE> |
|
<BR> |
Tests if this folder physically exists on the Store.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#expunge()">expunge</A></B>()</CODE> |
|
<BR> |
Expunge (permanently remove) messages marked DELETED.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#fetch(javax.mail.Message[], javax.mail.FetchProfile)">fetch</A></B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs, |
<A HREF="../../javax/mail/FetchProfile.html" title="class in javax.mail">FetchProfile</A> fp)</CODE> |
|
<BR> |
Prefetch the items specified in the FetchProfile for the |
given Messages.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#finalize()">finalize</A></B>()</CODE> |
|
<BR> |
</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getDeletedMessageCount()">getDeletedMessageCount</A></B>()</CODE> |
|
<BR> |
Get the number of deleted messages in this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getFolder(java.lang.String)">getFolder</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name)</CODE> |
|
<BR> |
Return the Folder object corresponding to the given name.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getFullName()">getFullName</A></B>()</CODE> |
|
<BR> |
Returns the full name of this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessage(int)">getMessage</A></B>(int msgnum)</CODE> |
|
<BR> |
Get the Message object corresponding to the given message |
number.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessageCount()">getMessageCount</A></B>()</CODE> |
|
<BR> |
Get total number of messages in this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessages()">getMessages</A></B>()</CODE> |
|
<BR> |
Get all Message objects from this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessages(int[])">getMessages</A></B>(int[] msgnums)</CODE> |
|
<BR> |
Get the Message objects for message numbers specified in |
the array.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessages(int, int)">getMessages</A></B>(int start, |
int end)</CODE> |
|
<BR> |
Get the Message objects for message numbers ranging from start |
through end, both start and end inclusive.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMode()">getMode</A></B>()</CODE> |
|
<BR> |
Return the open mode of this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getName()">getName</A></B>()</CODE> |
|
<BR> |
Returns the name of this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getNewMessageCount()">getNewMessageCount</A></B>()</CODE> |
|
<BR> |
Get the number of new messages in this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getParent()">getParent</A></B>()</CODE> |
|
<BR> |
Returns the parent folder of this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getPermanentFlags()">getPermanentFlags</A></B>()</CODE> |
|
<BR> |
Get the permanent flags supported by this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract char</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getSeparator()">getSeparator</A></B>()</CODE> |
|
<BR> |
Return the delimiter character that separates this Folder's pathname |
from the names of immediate subfolders.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getStore()">getStore</A></B>()</CODE> |
|
<BR> |
Returns the Store that owns this Folder object.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getType()">getType</A></B>()</CODE> |
|
<BR> |
Returns the type of this Folder, that is, whether this folder can hold |
messages or subfolders or both.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> int</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getUnreadMessageCount()">getUnreadMessageCount</A></B>()</CODE> |
|
<BR> |
Get the total number of unread messages in this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#getURLName()">getURLName</A></B>()</CODE> |
|
<BR> |
Return a URLName representing this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#hasNewMessages()">hasNewMessages</A></B>()</CODE> |
|
<BR> |
Returns true if this Folder has new messages since the last time |
this indication was reset.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#isOpen()">isOpen</A></B>()</CODE> |
|
<BR> |
Indicates whether this Folder is in the 'open' state.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#isSubscribed()">isSubscribed</A></B>()</CODE> |
|
<BR> |
Returns true if this Folder is subscribed.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#list()">list</A></B>()</CODE> |
|
<BR> |
Convenience method that returns the list of folders under this |
Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#list(java.lang.String)">list</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern)</CODE> |
|
<BR> |
Returns a list of Folders belonging to this Folder's namespace |
that match the specified pattern.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#listSubscribed()">listSubscribed</A></B>()</CODE> |
|
<BR> |
Convenience method that returns the list of subscribed folders |
under this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#listSubscribed(java.lang.String)">listSubscribed</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern)</CODE> |
|
<BR> |
Returns a list of subscribed Folders belonging to this Folder's |
namespace that match the specified pattern.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyConnectionListeners(int)">notifyConnectionListeners</A></B>(int type)</CODE> |
|
<BR> |
Notify all ConnectionListeners.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyFolderListeners(int)">notifyFolderListeners</A></B>(int type)</CODE> |
|
<BR> |
Notify all FolderListeners registered on this Folder and |
this folder's Store.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyFolderRenamedListeners(javax.mail.Folder)">notifyFolderRenamedListeners</A></B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder)</CODE> |
|
<BR> |
Notify all FolderListeners registered on this Folder and |
this folder's Store about the renaming of this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyMessageAddedListeners(javax.mail.Message[])">notifyMessageAddedListeners</A></B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs)</CODE> |
|
<BR> |
Notify all MessageCountListeners about the addition of messages |
into this folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyMessageChangedListeners(int, javax.mail.Message)">notifyMessageChangedListeners</A></B>(int type, |
<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> msg)</CODE> |
|
<BR> |
Notify all MessageChangedListeners.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>protected void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyMessageRemovedListeners(boolean, javax.mail.Message[])">notifyMessageRemovedListeners</A></B>(boolean removed, |
<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs)</CODE> |
|
<BR> |
Notify all MessageCountListeners about the removal of messages |
from this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#open(int)">open</A></B>(int mode)</CODE> |
|
<BR> |
Open this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#removeConnectionListener(javax.mail.event.ConnectionListener)">removeConnectionListener</A></B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A> l)</CODE> |
|
<BR> |
Remove a Connection event listener.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#removeFolderListener(javax.mail.event.FolderListener)">removeFolderListener</A></B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A> l)</CODE> |
|
<BR> |
Remove a Folder event listener.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#removeMessageChangedListener(javax.mail.event.MessageChangedListener)">removeMessageChangedListener</A></B>(<A HREF="../../javax/mail/event/MessageChangedListener.html" title="interface in javax.mail.event">MessageChangedListener</A> l)</CODE> |
|
<BR> |
Remove a MessageChanged listener.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#removeMessageCountListener(javax.mail.event.MessageCountListener)">removeMessageCountListener</A></B>(<A HREF="../../javax/mail/event/MessageCountListener.html" title="interface in javax.mail.event">MessageCountListener</A> l)</CODE> |
|
<BR> |
Remove a MessageCount listener.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE>abstract boolean</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#renameTo(javax.mail.Folder)">renameTo</A></B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> f)</CODE> |
|
<BR> |
Rename this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#search(javax.mail.search.SearchTerm)">search</A></B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A> term)</CODE> |
|
<BR> |
Search this Folder for messages matching the specified |
search criterion.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#search(javax.mail.search.SearchTerm, javax.mail.Message[])">search</A></B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A> term, |
<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs)</CODE> |
|
<BR> |
Search the given array of messages for those that match the |
specified search criterion.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#setFlags(int[], javax.mail.Flags, boolean)">setFlags</A></B>(int[] msgnums, |
<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> flag, |
boolean value)</CODE> |
|
<BR> |
Set the specified flags on the messages whose message numbers |
are in the array.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#setFlags(int, int, javax.mail.Flags, boolean)">setFlags</A></B>(int start, |
int end, |
<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> flag, |
boolean value)</CODE> |
|
<BR> |
Set the specified flags on the messages numbered from start |
through end, both start and end inclusive.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#setFlags(javax.mail.Message[], javax.mail.Flags, boolean)">setFlags</A></B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs, |
<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> flag, |
boolean value)</CODE> |
|
<BR> |
Set the specified flags on the messages specified in the array.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> void</CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#setSubscribed(boolean)">setSubscribed</A></B>(boolean subscribe)</CODE> |
|
<BR> |
Subscribe or unsubscribe this Folder.</TD> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
<TD><CODE><B><A HREF="../../javax/mail/Folder.html#toString()">toString</A></B>()</CODE> |
|
<BR> |
override the default toString(), it will return the String |
from Folder.getFullName() or if that is null, it will use |
the default toString() behavior.</TD> |
</TR> |
</TABLE> |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
</TR> |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
</TR> |
</TABLE> |
|
<P> |
|
<!-- ============ FIELD DETAIL =========== --> |
|
<A NAME="field_detail"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
<B>Field Detail</B></FONT></TH> |
</TR> |
</TABLE> |
|
<A NAME="store"><!-- --></A><H3> |
store</H3> |
<PRE> |
protected <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>store</B></PRE> |
<DL> |
<DD>The parent store. |
<P> |
<DL> |
</DL> |
</DL> |
<HR> |
|
<A NAME="mode"><!-- --></A><H3> |
mode</H3> |
<PRE> |
protected int <B>mode</B></PRE> |
<DL> |
<DD>The open mode of this folder. The open mode is |
<code>Folder.READ_ONLY</code>, <code>Folder.READ_WRITE</code>, |
or -1 if not known. |
<P> |
<DL> |
<DT><B>Since:</B></DT> |
<DD>JavaMail 1.1</DD> |
</DL> |
</DL> |
<HR> |
|
<A NAME="HOLDS_MESSAGES"><!-- --></A><H3> |
HOLDS_MESSAGES</H3> |
<PRE> |
public static final int <B>HOLDS_MESSAGES</B></PRE> |
<DL> |
<DD>This folder can contain messages |
<P> |
<DL> |
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.HOLDS_MESSAGES">Constant Field Values</A></DL> |
</DL> |
<HR> |
|
<A NAME="HOLDS_FOLDERS"><!-- --></A><H3> |
HOLDS_FOLDERS</H3> |
<PRE> |
public static final int <B>HOLDS_FOLDERS</B></PRE> |
<DL> |
<DD>This folder can contain other folders |
<P> |
<DL> |
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.HOLDS_FOLDERS">Constant Field Values</A></DL> |
</DL> |
<HR> |
|
<A NAME="READ_ONLY"><!-- --></A><H3> |
READ_ONLY</H3> |
<PRE> |
public static final int <B>READ_ONLY</B></PRE> |
<DL> |
<DD>The Folder is read only. The state and contents of this |
folder cannot be modified. |
<P> |
<DL> |
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.READ_ONLY">Constant Field Values</A></DL> |
</DL> |
<HR> |
|
<A NAME="READ_WRITE"><!-- --></A><H3> |
READ_WRITE</H3> |
<PRE> |
public static final int <B>READ_WRITE</B></PRE> |
<DL> |
<DD>The state and contents of this folder can be modified. |
<P> |
<DL> |
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.READ_WRITE">Constant Field Values</A></DL> |
</DL> |
|
<!-- ========= CONSTRUCTOR DETAIL ======== --> |
|
<A NAME="constructor_detail"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
<B>Constructor Detail</B></FONT></TH> |
</TR> |
</TABLE> |
|
<A NAME="Folder(javax.mail.Store)"><!-- --></A><H3> |
Folder</H3> |
<PRE> |
protected <B>Folder</B>(<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> store)</PRE> |
<DL> |
<DD>Constructor that takes a Store object. |
<P> |
<DL> |
<DT><B>Parameters:</B><DD><CODE>store</CODE> - the Store that holds this folder</DL> |
</DL> |
|
<!-- ============ METHOD DETAIL ========== --> |
|
<A NAME="method_detail"><!-- --></A> |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
<B>Method Detail</B></FONT></TH> |
</TR> |
</TABLE> |
|
<A NAME="getName()"><!-- --></A><H3> |
getName</H3> |
<PRE> |
public abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getName</B>()</PRE> |
<DL> |
<DD>Returns the name of this Folder. <p> |
|
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>name of the Folder</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getFullName()"><!-- --></A><H3> |
getFullName</H3> |
<PRE> |
public abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getFullName</B>()</PRE> |
<DL> |
<DD>Returns the full name of this Folder. If the folder resides under |
the root hierarchy of this Store, the returned name is relative |
to the root. Otherwise an absolute name, starting with the |
hierarchy delimiter, is returned. <p> |
|
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>full name of the Folder</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getURLName()"><!-- --></A><H3> |
getURLName</H3> |
<PRE> |
public <A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A> <B>getURLName</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Return a URLName representing this folder. The returned URLName |
does <em>not</em> include the password used to access the store. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>the URLName representing this folder |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT> |
<DD>JavaMail 1.1</DD> |
<DT><B>See Also:</B><DD><A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getStore()"><!-- --></A><H3> |
getStore</H3> |
<PRE> |
public <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>getStore</B>()</PRE> |
<DL> |
<DD>Returns the Store that owns this Folder object. |
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>the Store</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getParent()"><!-- --></A><H3> |
getParent</H3> |
<PRE> |
public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getParent</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Returns the parent folder of this folder. |
This method can be invoked on a closed Folder. If this folder |
is the top of a folder hierarchy, this method returns null. <p> |
|
Note that since Folder objects are not cached, invoking this method |
returns a new distinct Folder object. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>Parent folder |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="exists()"><!-- --></A><H3> |
exists</H3> |
<PRE> |
public abstract boolean <B>exists</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Tests if this folder physically exists on the Store. |
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>true if the folder exists, otherwise false |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - typically if the connection |
to the server is lost.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#create(int)"><CODE>create(int)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="list(java.lang.String)"><!-- --></A><H3> |
list</H3> |
<PRE> |
public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>list</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Returns a list of Folders belonging to this Folder's namespace |
that match the specified pattern. Patterns may contain the wildcard |
characters <code>"%"</code>, which matches any character except hierarchy |
delimiters, and <code>"*"</code>, which matches any character. <p> |
|
As an example, given the folder hierarchy: <pre> |
Personal/ |
Finance/ |
Stocks |
Bonus |
StockOptions |
Jokes |
</pre> |
<code>list("*")</code> on "Personal" will return the whole |
hierarchy. <br> |
<code>list("%")</code> on "Personal" will return "Finance" and |
"Jokes". <br> |
<code>list("Jokes")</code> on "Personal" will return "Jokes".<br> |
<code>list("Stock*")</code> on "Finance" will return "Stocks" |
and "StockOptions". <p> |
|
Folder objects are not cached by the Store, so invoking this |
method on the same pattern multiple times will return that many |
distinct Folder objects. <p> |
|
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the match pattern |
<DT><B>Returns:</B><DD>array of matching Folder objects. An empty |
array is returned if no matching Folders exist. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#listSubscribed(java.lang.String)"><CODE>listSubscribed(java.lang.String)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="listSubscribed(java.lang.String)"><!-- --></A><H3> |
listSubscribed</H3> |
<PRE> |
public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>listSubscribed</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Returns a list of subscribed Folders belonging to this Folder's |
namespace that match the specified pattern. If the folder does |
not support subscription, this method should resolve to |
<code>list</code>. |
(The default implementation provided here, does just this). |
The pattern can contain wildcards as for <code>list</code>. <p> |
|
Note that, at a given level of the folder hierarchy, a particular |
folder may not be subscribed, but folders underneath that folder |
in the folder hierarchy may be subscribed. In order to allow |
walking the folder hierarchy, such unsubscribed folders may be |
returned, indicating that a folder lower in the hierarchy is |
subscribed. The <code>isSubscribed</code> method on a folder will |
tell whether any particular folder is actually subscribed. <p> |
|
Folder objects are not cached by the Store, so invoking this |
method on the same pattern multiple times will return that many |
distinct Folder objects. <p> |
|
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the match pattern |
<DT><B>Returns:</B><DD>array of matching subscribed Folder objects. An |
empty array is returned if no matching |
subscribed folders exist. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#list(java.lang.String)"><CODE>list(java.lang.String)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="list()"><!-- --></A><H3> |
list</H3> |
<PRE> |
public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>list</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Convenience method that returns the list of folders under this |
Folder. This method just calls the <code>list(String pattern)</code> |
method with <code>"%"</code> as the match pattern. This method can |
be invoked on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>array of Folder objects under this Folder. An |
empty array is returned if no subfolders exist. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#list(java.lang.String)"><CODE>list(java.lang.String)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="listSubscribed()"><!-- --></A><H3> |
listSubscribed</H3> |
<PRE> |
public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>listSubscribed</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Convenience method that returns the list of subscribed folders |
under this Folder. This method just calls the |
<code>listSubscribed(String pattern)</code> method with <code>"%"</code> |
as the match pattern. This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>array of subscribed Folder objects under this |
Folder. An empty array is returned if no subscribed |
subfolders exist. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#listSubscribed(java.lang.String)"><CODE>listSubscribed(java.lang.String)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getSeparator()"><!-- --></A><H3> |
getSeparator</H3> |
<PRE> |
public abstract char <B>getSeparator</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Return the delimiter character that separates this Folder's pathname |
from the names of immediate subfolders. This method can be invoked |
on a closed Folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>Hierarchy separator character |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if the implementation |
requires the folder to exist, but it does not |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getType()"><!-- --></A><H3> |
getType</H3> |
<PRE> |
public abstract int <B>getType</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Returns the type of this Folder, that is, whether this folder can hold |
messages or subfolders or both. The returned value is an integer |
bitfield with the appropriate bits set. This method can be invoked |
on a closed folder. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>integer with appropriate bits set |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#HOLDS_FOLDERS"><CODE>HOLDS_FOLDERS</CODE></A>, |
<A HREF="../../javax/mail/Folder.html#HOLDS_MESSAGES"><CODE>HOLDS_MESSAGES</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="create(int)"><!-- --></A><H3> |
create</H3> |
<PRE> |
public abstract boolean <B>create</B>(int type) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Create this folder on the Store. When this folder is created, any |
folders in its path that do not exist are also created. <p> |
|
If the creation is successful, a CREATED FolderEvent is delivered |
to any FolderListeners registered on this Folder and this Store. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>type</CODE> - The type of this folder. |
<DT><B>Returns:</B><DD>true if the creation succeeds, else false. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#HOLDS_FOLDERS"><CODE>HOLDS_FOLDERS</CODE></A>, |
<A HREF="../../javax/mail/Folder.html#HOLDS_MESSAGES"><CODE>HOLDS_MESSAGES</CODE></A>, |
<A HREF="../../javax/mail/event/FolderEvent.html" title="class in javax.mail.event"><CODE>FolderEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="isSubscribed()"><!-- --></A><H3> |
isSubscribed</H3> |
<PRE> |
public boolean <B>isSubscribed</B>()</PRE> |
<DL> |
<DD>Returns true if this Folder is subscribed. <p> |
|
This method can be invoked on a closed Folder. <p> |
|
The default implementation provided here just returns true. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>true if this Folder is subscribed</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="setSubscribed(boolean)"><!-- --></A><H3> |
setSubscribed</H3> |
<PRE> |
public void <B>setSubscribed</B>(boolean subscribe) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Subscribe or unsubscribe this Folder. Not all Stores support |
subscription. <p> |
|
This method can be invoked on a closed Folder. <p> |
|
The implementation provided here just throws the |
MethodNotSupportedException. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>subscribe</CODE> - true to subscribe, false to unsubscribe |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail">MethodNotSupportedException</A></CODE> - if this store |
does not support subscription |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="hasNewMessages()"><!-- --></A><H3> |
hasNewMessages</H3> |
<PRE> |
public abstract boolean <B>hasNewMessages</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Returns true if this Folder has new messages since the last time |
this indication was reset. When this indication is set or reset |
depends on the Folder implementation (and in the case of IMAP, |
depends on the server). This method can be used to implement |
a lightweight "check for new mail" operation on a Folder without |
opening it. (For example, a thread that monitors a mailbox and |
flags when it has new mail.) This method should indicate whether |
any messages in the Folder have the <code>RECENT</code> flag set. <p> |
|
Note that this is not an incremental check for new mail, i.e., |
it cannot be used to determine whether any new messages have |
arrived since the last time this method was invoked. To |
implement incremental checks, the Folder needs to be opened. <p> |
|
This method can be invoked on a closed Folder that can contain |
Messages. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>true if the Store has new Messages |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getFolder(java.lang.String)"><!-- --></A><H3> |
getFolder</H3> |
<PRE> |
public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getFolder</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Return the Folder object corresponding to the given name. Note that |
this folder does not physically have to exist in the Store. The |
<code>exists()</code> method on a Folder indicates whether it really |
exists on the Store. <p> |
|
In some Stores, name can be an absolute path if it starts with the |
hierarchy delimiter. Otherwise, it is interpreted relative to |
this Folder. <p> |
|
Folder objects are not cached by the Store, so invoking this |
method on the same name multiple times will return that many |
distinct Folder objects. <p> |
|
This method can be invoked on a closed Folder. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the Folder |
<DT><B>Returns:</B><DD>Folder object |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="delete(boolean)"><!-- --></A><H3> |
delete</H3> |
<PRE> |
public abstract boolean <B>delete</B>(boolean recurse) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Delete this Folder. This method will succeed only on a closed |
Folder. <p> |
|
The <code>recurse</code> flag controls whether the deletion affects |
subfolders or not. If true, all subfolders are deleted, then this |
folder itself is deleted. If false, the behaviour is dependent on |
the folder type and is elaborated below: <p> |
|
<ul> |
<li> |
The folder can contain only messages: (type == HOLDS_MESSAGES). |
<br> |
All messages within the folder are removed. The folder |
itself is then removed. An appropriate FolderEvent is generated by |
the Store and this folder. <p> |
|
<li> |
The folder can contain only subfolders: (type == HOLDS_FOLDERS). |
<br> |
If this folder is empty (does not contain any |
subfolders at all), it is removed. An appropriate FolderEvent is |
generated by the Store and this folder.<br> |
If this folder contains any subfolders, the delete fails |
and returns false. <p> |
|
<li> |
The folder can contain subfolders as well as messages: <br> |
If the folder is empty (no messages or subfolders), it |
is removed. If the folder contains no subfolders, but only messages, |
then all messages are removed. The folder itself is then removed. |
In both the above cases, an appropriate FolderEvent is |
generated by the Store and this folder. <p> |
|
If the folder contains subfolders there are 3 possible |
choices an implementation is free to do: <p> |
|
<ol> |
<li> The operation fails, irrespective of whether this folder |
contains messages or not. Some implementations might elect to go |
with this simple approach. The delete() method returns false. |
|
<li> Any messages within the folder are removed. Subfolders |
are not removed. The folder itself is not removed or affected |
in any manner. The delete() method returns true. And the |
exists() method on this folder will return true indicating that |
this folder still exists. <br> |
An appropriate FolderEvent is generated by the Store and this folder. |
|
<li> Any messages within the folder are removed. Subfolders are |
not removed. The folder itself changes its type from |
HOLDS_FOLDERS | HOLDS_MESSAGES to HOLDS_FOLDERS. Thus new |
messages cannot be added to this folder, but new subfolders can |
be created underneath. The delete() method returns true indicating |
success. The exists() method on this folder will return true |
indicating that this folder still exists. <br> |
An appropriate FolderEvent is generated by the Store and this folder. |
</ol> |
</ul> |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>true if the Folder is deleted successfully |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not in |
the closed state. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/FolderEvent.html" title="class in javax.mail.event"><CODE>FolderEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="renameTo(javax.mail.Folder)"><!-- --></A><H3> |
renameTo</H3> |
<PRE> |
public abstract boolean <B>renameTo</B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> f) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Rename this Folder. This method will succeed only on a closed |
Folder. <p> |
|
If the rename is successful, a RENAMED FolderEvent is delivered |
to FolderListeners registered on this folder and its containing |
Store. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>f</CODE> - a folder representing the new name for this Folder |
<DT><B>Returns:</B><DD>true if the Folder is renamed successfully |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not in |
the closed state. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/FolderEvent.html" title="class in javax.mail.event"><CODE>FolderEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="open(int)"><!-- --></A><H3> |
open</H3> |
<PRE> |
public abstract void <B>open</B>(int mode) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Open this Folder. This method is valid only on Folders that |
can contain Messages and that are closed. <p> |
|
If this folder is opened successfully, an OPENED ConnectionEvent |
is delivered to any ConnectionListeners registered on this |
Folder. <p> |
|
The effect of opening multiple connections to the same folder |
on a specifc Store is implementation dependent. Some implementations |
allow multiple readers, but only one writer. Others allow |
multiple writers as well as readers. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>mode</CODE> - open the Folder READ_ONLY or READ_WRITE |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not in |
the closed state. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#READ_ONLY"><CODE>READ_ONLY</CODE></A>, |
<A HREF="../../javax/mail/Folder.html#READ_WRITE"><CODE>READ_WRITE</CODE></A>, |
<A HREF="../../javax/mail/Folder.html#getType()"><CODE>getType()</CODE></A>, |
<A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="close(boolean)"><!-- --></A><H3> |
close</H3> |
<PRE> |
public abstract void <B>close</B>(boolean expunge) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Close this Folder. This method is valid only on open Folders. <p> |
|
A CLOSED ConnectionEvent is delivered to any ConnectionListeners |
registered on this Folder. Note that the folder is closed even |
if this method terminates abnormally by throwing a |
MessagingException. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>expunge</CODE> - expunges all deleted messages if this flag is true |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="isOpen()"><!-- --></A><H3> |
isOpen</H3> |
<PRE> |
public abstract boolean <B>isOpen</B>()</PRE> |
<DL> |
<DD>Indicates whether this Folder is in the 'open' state. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>true if this Folder is in the 'open' state.</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getMode()"><!-- --></A><H3> |
getMode</H3> |
<PRE> |
public int <B>getMode</B>()</PRE> |
<DL> |
<DD>Return the open mode of this folder. Returns |
<code>Folder.READ_ONLY</code>, <code>Folder.READ_WRITE</code>, |
or -1 if the open mode is not known (usually only because an older |
<code>Folder</code> provider has not been updated to use this new |
method). |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>the open mode of this folder |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened<DT><B>Since:</B></DT> |
<DD>JavaMail 1.1</DD> |
</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getPermanentFlags()"><!-- --></A><H3> |
getPermanentFlags</H3> |
<PRE> |
public abstract <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>getPermanentFlags</B>()</PRE> |
<DL> |
<DD>Get the permanent flags supported by this Folder. Returns a Flags |
object that contains all the flags supported. <p> |
|
The special flag <code>Flags.USER </code> indicates that this Folder |
supports arbitrary user-defined flags. <p> |
|
The supported permanent flags for a folder may not be available |
until the folder is opened. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>permanent flags, or null if not known</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getMessageCount()"><!-- --></A><H3> |
getMessageCount</H3> |
<PRE> |
public abstract int <B>getMessageCount</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get total number of messages in this Folder. <p> |
|
This method can be invoked on a closed folder. However, note |
that for some folder implementations, getting the total message |
count can be an expensive operation involving actually opening |
the folder. In such cases, a provider can choose not to support |
this functionality in the closed state, in which case this method |
must return -1. <p> |
|
Clients invoking this method on a closed folder must be aware |
that this is a potentially expensive operation. Clients must |
also be prepared to handle a return value of -1 in this case. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>total number of messages. -1 may be returned |
by certain implementations if this method is |
invoked on a closed folder. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getNewMessageCount()"><!-- --></A><H3> |
getNewMessageCount</H3> |
<PRE> |
public int <B>getNewMessageCount</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get the number of new messages in this Folder. <p> |
|
This method can be invoked on a closed folder. However, note |
that for some folder implementations, getting the new message |
count can be an expensive operation involving actually opening |
the folder. In such cases, a provider can choose not to support |
this functionality in the closed state, in which case this method |
must return -1. <p> |
|
Clients invoking this method on a closed folder must be aware |
that this is a potentially expensive operation. Clients must |
also be prepared to handle a return value of -1 in this case. <p> |
|
This implementation returns -1 if this folder is closed. Else |
this implementation gets each Message in the folder using |
<code>getMessage(int)</code> and checks whether its |
<code>RECENT</code> flag is set. The total number of messages |
that have this flag set is returned. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>number of new messages. -1 may be returned |
by certain implementations if this method is |
invoked on a closed folder. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getUnreadMessageCount()"><!-- --></A><H3> |
getUnreadMessageCount</H3> |
<PRE> |
public int <B>getUnreadMessageCount</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get the total number of unread messages in this Folder. <p> |
|
This method can be invoked on a closed folder. However, note |
that for some folder implementations, getting the unread message |
count can be an expensive operation involving actually opening |
the folder. In such cases, a provider can choose not to support |
this functionality in the closed state, in which case this method |
must return -1. <p> |
|
Clients invoking this method on a closed folder must be aware |
that this is a potentially expensive operation. Clients must |
also be prepared to handle a return value of -1 in this case. <p> |
|
This implementation returns -1 if this folder is closed. Else |
this implementation gets each Message in the folder using |
<code>getMessage(int)</code> and checks whether its |
<code>SEEN</code> flag is set. The total number of messages |
that do not have this flag set is returned. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>total number of unread messages. -1 may be returned |
by certain implementations if this method is |
invoked on a closed folder. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getDeletedMessageCount()"><!-- --></A><H3> |
getDeletedMessageCount</H3> |
<PRE> |
public int <B>getDeletedMessageCount</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get the number of deleted messages in this Folder. <p> |
|
This method can be invoked on a closed folder. However, note |
that for some folder implementations, getting the deleted message |
count can be an expensive operation involving actually opening |
the folder. In such cases, a provider can choose not to support |
this functionality in the closed state, in which case this method |
must return -1. <p> |
|
Clients invoking this method on a closed folder must be aware |
that this is a potentially expensive operation. Clients must |
also be prepared to handle a return value of -1 in this case. <p> |
|
This implementation returns -1 if this folder is closed. Else |
this implementation gets each Message in the folder using |
<code>getMessage(int)</code> and checks whether its |
<code>DELETED</code> flag is set. The total number of messages |
that have this flag set is returned. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>number of deleted messages. -1 may be returned |
by certain implementations if this method is |
invoked on a closed folder. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT> |
<DD>JavaMail 1.3</DD> |
</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getMessage(int)"><!-- --></A><H3> |
getMessage</H3> |
<PRE> |
public abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> <B>getMessage</B>(int msgnum) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get the Message object corresponding to the given message |
number. A Message object's message number is the relative |
position of this Message in its Folder. Messages are numbered |
starting at 1 through the total number of message in the folder. |
Note that the message number for a particular Message can change |
during a session if other messages in the Folder are deleted and |
the Folder is expunged. <p> |
|
Message objects are light-weight references to the actual message |
that get filled up on demand. Hence Folder implementations are |
expected to provide light-weight Message objects. <p> |
|
Unlike Folder objects, repeated calls to getMessage with the |
same message number will return the same Message object, as |
long as no messages in this folder have been expunged. <p> |
|
Since message numbers can change within a session if the folder |
is expunged , clients are advised not to use message numbers as |
references to messages. Use Message objects instead. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgnum</CODE> - the message number |
<DT><B>Returns:</B><DD>the Message object |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the message number |
is out of range. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#getMessageCount()"><CODE>getMessageCount()</CODE></A>, |
<A HREF="../../javax/mail/Folder.html#fetch(javax.mail.Message[], javax.mail.FetchProfile)"><CODE>fetch(javax.mail.Message[], javax.mail.FetchProfile)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getMessages(int, int)"><!-- --></A><H3> |
getMessages</H3> |
<PRE> |
public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>getMessages</B>(int start, |
int end) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get the Message objects for message numbers ranging from start |
through end, both start and end inclusive. Note that message |
numbers start at 1, not 0. <p> |
|
Message objects are light-weight references to the actual message |
that get filled up on demand. Hence Folder implementations are |
expected to provide light-weight Message objects. <p> |
|
This implementation uses getMessage(index) to obtain the required |
Message objects. Note that the returned array must contain |
<code>(end-start+1)</code> Message objects. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>start</CODE> - the number of the first message<DD><CODE>end</CODE> - the number of the last message |
<DT><B>Returns:</B><DD>the Message objects |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the start or end |
message numbers are out of range. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#fetch(javax.mail.Message[], javax.mail.FetchProfile)"><CODE>fetch(javax.mail.Message[], javax.mail.FetchProfile)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getMessages(int[])"><!-- --></A><H3> |
getMessages</H3> |
<PRE> |
public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>getMessages</B>(int[] msgnums) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get the Message objects for message numbers specified in |
the array. <p> |
|
Message objects are light-weight references to the actual message |
that get filled up on demand. Hence Folder implementations are |
expected to provide light-weight Message objects. <p> |
|
This implementation uses getMessage(index) to obtain the required |
Message objects. Note that the returned array must contain |
<code>msgnums.length</code> Message objects |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgnums</CODE> - the array of message numbers |
<DT><B>Returns:</B><DD>the array of Message objects. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if any message number |
in the given array is out of range. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#fetch(javax.mail.Message[], javax.mail.FetchProfile)"><CODE>fetch(javax.mail.Message[], javax.mail.FetchProfile)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="getMessages()"><!-- --></A><H3> |
getMessages</H3> |
<PRE> |
public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>getMessages</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Get all Message objects from this Folder. Returns an empty array |
if the folder is empty. |
|
Clients can use Message objects (instead of sequence numbers) |
as references to the messages within a folder; this method supplies |
the Message objects to the client. Folder implementations are |
expected to provide light-weight Message objects, which get |
filled on demand. <p> |
|
This implementation invokes <code>getMessageCount()</code> to get |
the current message count and then uses <code>getMessage()</code> |
to get Message objects from 1 till the message count. |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>array of Message objects, empty array if folder |
is empty. |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#fetch(javax.mail.Message[], javax.mail.FetchProfile)"><CODE>fetch(javax.mail.Message[], javax.mail.FetchProfile)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="appendMessages(javax.mail.Message[])"><!-- --></A><H3> |
appendMessages</H3> |
<PRE> |
public abstract void <B>appendMessages</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Append given Messages to this folder. This method can be |
invoked on a closed Folder. An appropriate MessageCountEvent |
is delivered to any MessageCountListener registered on this |
folder when the messages arrive in the folder. <p> |
|
Folder implementations must not abort this operation if a |
Message in the given message array turns out to be an |
expunged Message. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgs</CODE> - array of Messages to be appended |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if the append failed.</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="fetch(javax.mail.Message[], javax.mail.FetchProfile)"><!-- --></A><H3> |
fetch</H3> |
<PRE> |
public void <B>fetch</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs, |
<A HREF="../../javax/mail/FetchProfile.html" title="class in javax.mail">FetchProfile</A> fp) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Prefetch the items specified in the FetchProfile for the |
given Messages. <p> |
|
Clients use this method to indicate that the specified items are |
needed en-masse for the given message range. Implementations are |
expected to retrieve these items for the given message range in |
a efficient manner. Note that this method is just a hint to the |
implementation to prefetch the desired items. <p> |
|
An example is a client filling its header-view window with |
the Subject, From and X-mailer headers for all messages in the |
folder.<p> |
<blockquote><pre> |
|
Message[] msgs = folder.getMessages(); |
|
FetchProfile fp = new FetchProfile(); |
fp.add(FetchProfile.Item.ENVELOPE); |
fp.add("X-mailer"); |
folder.fetch(msgs, fp); |
|
for (int i = 0; i < folder.getMessageCount(); i++) { |
display(msg[i].getFrom()); |
display(msg[i].getSubject()); |
display(msg[i].getHeader("X-mailer")); |
} |
|
</pre></blockquote><p> |
|
The implementation provided here just returns without |
doing anything useful. Providers wanting to provide a real |
implementation for this method should override this method. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgs</CODE> - fetch items for these messages<DD><CODE>fp</CODE> - the FetchProfile |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
<DD><CODE>MessagingException.</CODE> |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="setFlags(javax.mail.Message[], javax.mail.Flags, boolean)"><!-- --></A><H3> |
setFlags</H3> |
<PRE> |
public void <B>setFlags</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs, |
<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> flag, |
boolean value) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Set the specified flags on the messages specified in the array. |
This will result in appropriate MessageChangedEvents being |
delivered to any MessageChangedListener registered on this |
Message's containing folder. <p> |
|
Note that the specified Message objects <strong>must</strong> |
belong to this folder. Certain Folder implementations can |
optimize the operation of setting Flags for a group of messages, |
so clients might want to use this method, rather than invoking |
<code>Message.setFlags</code> for each Message. <p> |
|
This implementation degenerates to invoking <code>setFlags()</code> |
on each Message object. Specific Folder implementations that can |
optimize this case should do so. |
Also, an implementation must not abort the operation if a Message |
in the array turns out to be an expunged Message. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgs</CODE> - the array of message objects<DD><CODE>flag</CODE> - Flags object containing the flags to be set<DD><CODE>value</CODE> - set the flags to this boolean value |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
or if it has been opened READ_ONLY. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)"><CODE>Message.setFlags(javax.mail.Flags, boolean)</CODE></A>, |
<A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="setFlags(int, int, javax.mail.Flags, boolean)"><!-- --></A><H3> |
setFlags</H3> |
<PRE> |
public void <B>setFlags</B>(int start, |
int end, |
<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> flag, |
boolean value) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Set the specified flags on the messages numbered from start |
through end, both start and end inclusive. Note that message |
numbers start at 1, not 0. |
This will result in appropriate MessageChangedEvents being |
delivered to any MessageChangedListener registered on this |
Message's containing folder. <p> |
|
Certain Folder implementations can |
optimize the operation of setting Flags for a group of messages, |
so clients might want to use this method, rather than invoking |
<code>Message.setFlags</code> for each Message. <p> |
|
The default implementation uses <code>getMessage(int)</code> to |
get each <code>Message</code> object and then invokes |
<code>setFlags</code> on that object to set the flags. |
Specific Folder implementations that can optimize this case should do so. |
Also, an implementation must not abort the operation if a message |
number refers to an expunged message. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>start</CODE> - the number of the first message<DD><CODE>end</CODE> - the number of the last message<DD><CODE>flag</CODE> - Flags object containing the flags to be set<DD><CODE>value</CODE> - set the flags to this boolean value |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
or if it has been opened READ_ONLY. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the start or end |
message numbers are out of range. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)"><CODE>Message.setFlags(javax.mail.Flags, boolean)</CODE></A>, |
<A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="setFlags(int[], javax.mail.Flags, boolean)"><!-- --></A><H3> |
setFlags</H3> |
<PRE> |
public void <B>setFlags</B>(int[] msgnums, |
<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> flag, |
boolean value) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Set the specified flags on the messages whose message numbers |
are in the array. |
This will result in appropriate MessageChangedEvents being |
delivered to any MessageChangedListener registered on this |
Message's containing folder. <p> |
|
Certain Folder implementations can |
optimize the operation of setting Flags for a group of messages, |
so clients might want to use this method, rather than invoking |
<code>Message.setFlags</code> for each Message. <p> |
|
The default implementation uses <code>getMessage(int)</code> to |
get each <code>Message</code> object and then invokes |
<code>setFlags</code> on that object to set the flags. |
Specific Folder implementations that can optimize this case should do so. |
Also, an implementation must not abort the operation if a message |
number refers to an expunged message. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgnums</CODE> - the array of message numbers<DD><CODE>flag</CODE> - Flags object containing the flags to be set<DD><CODE>value</CODE> - set the flags to this boolean value |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
or if it has been opened READ_ONLY. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if any message number |
in the given array is out of range. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)"><CODE>Message.setFlags(javax.mail.Flags, boolean)</CODE></A>, |
<A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="copyMessages(javax.mail.Message[], javax.mail.Folder)"><!-- --></A><H3> |
copyMessages</H3> |
<PRE> |
public void <B>copyMessages</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs, |
<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Copy the specified Messages from this Folder into another |
Folder. This operation appends these Messages to the |
destination Folder. The destination Folder does not have to |
be opened. An appropriate MessageCountEvent |
is delivered to any MessageCountListener registered on the |
destination folder when the messages arrive in the folder. <p> |
|
Note that the specified Message objects <strong>must</strong> |
belong to this folder. Folder implementations might be able |
to optimize this method by doing server-side copies. <p> |
|
This implementation just invokes <code>appendMessages()</code> |
on the destination folder to append the given Messages. Specific |
folder implementations that support server-side copies should |
do so, if the destination folder's Store is the same as this |
folder's Store. |
Also, an implementation must not abort the operation if a |
Message in the array turns out to be an expunged Message. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>msgs</CODE> - the array of message objects<DD><CODE>folder</CODE> - the folder to copy the messages to |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if the destination |
folder does not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#appendMessages(javax.mail.Message[])"><CODE>appendMessages(javax.mail.Message[])</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="expunge()"><!-- --></A><H3> |
expunge</H3> |
<PRE> |
public abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>expunge</B>() |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Expunge (permanently remove) messages marked DELETED. Returns an |
array containing the expunged message objects. The |
<code>getMessageNumber</code> method |
on each of these message objects returns that Message's original |
(that is, prior to the expunge) sequence number. A MessageCountEvent |
containing the expunged messages is delivered to any |
MessageCountListeners registered on the folder. <p> |
|
Expunge causes the renumbering of Message objects subsequent to |
the expunged messages. Clients that use message numbers as |
references to messages should be aware of this and should be |
prepared to deal with the situation (probably by flushing out |
existing message number caches and reloading them). Because of |
this complexity, it is better for clients to use Message objects |
as references to messages, rather than message numbers. Any |
expunged Messages objects still have to be pruned, but other |
Messages in that folder are not affected by the expunge. <p> |
|
After a message is expunged, only the <code>isExpunged</code> and |
<code>getMessageNumber</code> methods are still valid on the |
corresponding Message object; other methods may throw |
<code>MessageRemovedException</code> |
<P> |
<DD><DL> |
|
<DT><B>Returns:</B><DD>array of expunged Message objects |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does not |
exist |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.html#isExpunged()"><CODE>Message.isExpunged()</CODE></A>, |
<A HREF="../../javax/mail/event/MessageCountEvent.html" title="class in javax.mail.event"><CODE>MessageCountEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="search(javax.mail.search.SearchTerm)"><!-- --></A><H3> |
search</H3> |
<PRE> |
public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>search</B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A> term) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Search this Folder for messages matching the specified |
search criterion. Returns an array containing the matching |
messages . Returns an empty array if no matches were found. <p> |
|
This implementation invokes |
<code>search(term, getMessages())</code>, to apply the search |
over all the messages in this folder. Providers that can implement |
server-side searching might want to override this method to provide |
a more efficient implementation. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>term</CODE> - the search criterion |
<DT><B>Returns:</B><DD>array of matching messages |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/search/SearchException.html" title="class in javax.mail.search">SearchException</A></CODE> - if the search |
term is too complex for the implementation to handle. |
<DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does |
not exist. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened. |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search"><CODE>SearchTerm</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="search(javax.mail.search.SearchTerm, javax.mail.Message[])"><!-- --></A><H3> |
search</H3> |
<PRE> |
public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>search</B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A> term, |
<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs) |
throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE> |
<DL> |
<DD>Search the given array of messages for those that match the |
specified search criterion. Returns an array containing the |
matching messages. Returns an empty array if no matches were |
found. <p> |
|
Note that the specified Message objects <strong>must</strong> |
belong to this folder. <p> |
|
This implementation iterates through the given array of messages, |
and applies the search criterion on each message by calling |
its <code>match()</code> method with the given term. The |
messages that succeed in the match are returned. Providers |
that can implement server-side searching might want to override |
this method to provide a more efficient implementation. If the |
search term is too complex or contains user-defined terms that |
cannot be executed on the server, providers may elect to either |
throw a SearchException or degenerate to client-side searching by |
calling <code>super.search()</code> to invoke this implementation. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>term</CODE> - the search criterion<DD><CODE>msgs</CODE> - the messages to be searched |
<DT><B>Returns:</B><DD>array of matching messages |
<DT><B>Throws:</B> |
<DD><CODE><A HREF="../../javax/mail/search/SearchException.html" title="class in javax.mail.search">SearchException</A></CODE> - if the search |
term is too complex for the implementation to handle. |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this folder is not opened |
<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search"><CODE>SearchTerm</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="addConnectionListener(javax.mail.event.ConnectionListener)"><!-- --></A><H3> |
addConnectionListener</H3> |
<PRE> |
public void <B>addConnectionListener</B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A> l)</PRE> |
<DL> |
<DD>Add a listener for Connection events on this Folder. <p> |
|
The implementation provided here adds this listener |
to an internal list of ConnectionListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the Listener for Connection events<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="removeConnectionListener(javax.mail.event.ConnectionListener)"><!-- --></A><H3> |
removeConnectionListener</H3> |
<PRE> |
public void <B>removeConnectionListener</B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A> l)</PRE> |
<DL> |
<DD>Remove a Connection event listener. <p> |
|
The implementation provided here removes this listener |
from the internal list of ConnectionListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#addConnectionListener(javax.mail.event.ConnectionListener)"><CODE>addConnectionListener(javax.mail.event.ConnectionListener)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="notifyConnectionListeners(int)"><!-- --></A><H3> |
notifyConnectionListeners</H3> |
<PRE> |
protected void <B>notifyConnectionListeners</B>(int type)</PRE> |
<DL> |
<DD>Notify all ConnectionListeners. Folder implementations are |
expected to use this method to broadcast connection events. <p> |
|
The provided implementation queues the event into |
an internal event queue. An event dispatcher thread dequeues |
events from the queue and dispatches them to the registered |
ConnectionListeners. Note that the event dispatching occurs |
in a separate thread, thus avoiding potential deadlock problems. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the ConnectionEvent type<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="addFolderListener(javax.mail.event.FolderListener)"><!-- --></A><H3> |
addFolderListener</H3> |
<PRE> |
public void <B>addFolderListener</B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A> l)</PRE> |
<DL> |
<DD>Add a listener for Folder events on this Folder. <p> |
|
The implementation provided here adds this listener |
to an internal list of FolderListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the Listener for Folder events<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/FolderEvent.html" title="class in javax.mail.event"><CODE>FolderEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="removeFolderListener(javax.mail.event.FolderListener)"><!-- --></A><H3> |
removeFolderListener</H3> |
<PRE> |
public void <B>removeFolderListener</B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A> l)</PRE> |
<DL> |
<DD>Remove a Folder event listener. <p> |
|
The implementation provided here removes this listener |
from the internal list of FolderListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#addFolderListener(javax.mail.event.FolderListener)"><CODE>addFolderListener(javax.mail.event.FolderListener)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="notifyFolderListeners(int)"><!-- --></A><H3> |
notifyFolderListeners</H3> |
<PRE> |
protected void <B>notifyFolderListeners</B>(int type)</PRE> |
<DL> |
<DD>Notify all FolderListeners registered on this Folder and |
this folder's Store. Folder implementations are expected |
to use this method to broadcast Folder events. <p> |
|
The implementation provided here queues the event into |
an internal event queue. An event dispatcher thread dequeues |
events from the queue and dispatches them to the |
FolderListeners registered on this folder. The implementation |
also invokes <code>notifyFolderListeners</code> on this folder's |
Store to notify any FolderListeners registered on the store. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>type</CODE> - type of FolderEvent<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#notifyFolderRenamedListeners(javax.mail.Folder)"><CODE>notifyFolderRenamedListeners(javax.mail.Folder)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="notifyFolderRenamedListeners(javax.mail.Folder)"><!-- --></A><H3> |
notifyFolderRenamedListeners</H3> |
<PRE> |
protected void <B>notifyFolderRenamedListeners</B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder)</PRE> |
<DL> |
<DD>Notify all FolderListeners registered on this Folder and |
this folder's Store about the renaming of this folder. |
Folder implementations are expected to use this method to |
broadcast Folder events indicating the renaming of folders. <p> |
|
The implementation provided here queues the event into |
an internal event queue. An event dispatcher thread dequeues |
events from the queue and dispatches them to the |
FolderListeners registered on this folder. The implementation |
also invokes <code>notifyFolderRenamedListeners</code> on this |
folder's Store to notify any FolderListeners registered on the store. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>folder</CODE> - Folder representing the new name.<DT><B>Since:</B></DT> |
<DD>JavaMail 1.1</DD> |
<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#notifyFolderListeners(int)"><CODE>notifyFolderListeners(int)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="addMessageCountListener(javax.mail.event.MessageCountListener)"><!-- --></A><H3> |
addMessageCountListener</H3> |
<PRE> |
public void <B>addMessageCountListener</B>(<A HREF="../../javax/mail/event/MessageCountListener.html" title="interface in javax.mail.event">MessageCountListener</A> l)</PRE> |
<DL> |
<DD>Add a listener for MessageCount events on this Folder. <p> |
|
The implementation provided here adds this listener |
to an internal list of MessageCountListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the Listener for MessageCount events<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/MessageCountEvent.html" title="class in javax.mail.event"><CODE>MessageCountEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="removeMessageCountListener(javax.mail.event.MessageCountListener)"><!-- --></A><H3> |
removeMessageCountListener</H3> |
<PRE> |
public void <B>removeMessageCountListener</B>(<A HREF="../../javax/mail/event/MessageCountListener.html" title="interface in javax.mail.event">MessageCountListener</A> l)</PRE> |
<DL> |
<DD>Remove a MessageCount listener. <p> |
|
The implementation provided here removes this listener |
from the internal list of MessageCountListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#addMessageCountListener(javax.mail.event.MessageCountListener)"><CODE>addMessageCountListener(javax.mail.event.MessageCountListener)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="notifyMessageAddedListeners(javax.mail.Message[])"><!-- --></A><H3> |
notifyMessageAddedListeners</H3> |
<PRE> |
protected void <B>notifyMessageAddedListeners</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs)</PRE> |
<DL> |
<DD>Notify all MessageCountListeners about the addition of messages |
into this folder. Folder implementations are expected to use this |
method to broadcast MessageCount events for indicating arrival of |
new messages. <p> |
|
The provided implementation queues the event into |
an internal event queue. An event dispatcher thread dequeues |
events from the queue and dispatches them to the registered |
MessageCountListeners. Note that the event dispatching occurs |
in a separate thread, thus avoiding potential deadlock problems. |
<P> |
<DD><DL> |
</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="notifyMessageRemovedListeners(boolean, javax.mail.Message[])"><!-- --></A><H3> |
notifyMessageRemovedListeners</H3> |
<PRE> |
protected void <B>notifyMessageRemovedListeners</B>(boolean removed, |
<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] msgs)</PRE> |
<DL> |
<DD>Notify all MessageCountListeners about the removal of messages |
from this Folder. Folder implementations are expected to use this |
method to broadcast MessageCount events indicating removal of |
messages. <p> |
|
The provided implementation queues the event into |
an internal event queue. An event dispatcher thread dequeues |
events from the queue and dispatches them to the registered |
MessageCountListeners. Note that the event dispatching occurs |
in a separate thread, thus avoiding potential deadlock problems. |
<P> |
<DD><DL> |
</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="addMessageChangedListener(javax.mail.event.MessageChangedListener)"><!-- --></A><H3> |
addMessageChangedListener</H3> |
<PRE> |
public void <B>addMessageChangedListener</B>(<A HREF="../../javax/mail/event/MessageChangedListener.html" title="interface in javax.mail.event">MessageChangedListener</A> l)</PRE> |
<DL> |
<DD>Add a listener for MessageChanged events on this Folder. <p> |
|
The implementation provided here adds this listener |
to an internal list of MessageChangedListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the Listener for MessageChanged events<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="removeMessageChangedListener(javax.mail.event.MessageChangedListener)"><!-- --></A><H3> |
removeMessageChangedListener</H3> |
<PRE> |
public void <B>removeMessageChangedListener</B>(<A HREF="../../javax/mail/event/MessageChangedListener.html" title="interface in javax.mail.event">MessageChangedListener</A> l)</PRE> |
<DL> |
<DD>Remove a MessageChanged listener. <p> |
|
The implementation provided here removes this listener |
from the internal list of MessageChangedListeners. |
<P> |
<DD><DL> |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#addMessageChangedListener(javax.mail.event.MessageChangedListener)"><CODE>addMessageChangedListener(javax.mail.event.MessageChangedListener)</CODE></A></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="notifyMessageChangedListeners(int, javax.mail.Message)"><!-- --></A><H3> |
notifyMessageChangedListeners</H3> |
<PRE> |
protected void <B>notifyMessageChangedListeners</B>(int type, |
<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> msg)</PRE> |
<DL> |
<DD>Notify all MessageChangedListeners. Folder implementations are |
expected to use this method to broadcast MessageChanged events. <p> |
|
The provided implementation queues the event into |
an internal event queue. An event dispatcher thread dequeues |
events from the queue and dispatches them to registered |
MessageChangedListeners. Note that the event dispatching occurs |
in a separate thread, thus avoiding potential deadlock problems. |
<P> |
<DD><DL> |
</DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="finalize()"><!-- --></A><H3> |
finalize</H3> |
<PRE> |
protected void <B>finalize</B>() |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></PRE> |
<DL> |
<DD><DL> |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> |
</DD> |
<DD><DL> |
|
<DT><B>Throws:</B> |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></CODE></DL> |
</DD> |
</DL> |
<HR> |
|
<A NAME="toString()"><!-- --></A><H3> |
toString</H3> |
<PRE> |
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> |
<DL> |
<DD>override the default toString(), it will return the String |
from Folder.getFullName() or if that is null, it will use |
the default toString() behavior. |
<P> |
<DD><DL> |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> |
</DD> |
<DD><DL> |
</DL> |
</DD> |
</DL> |
<!-- ========= END OF CLASS DATA ========= --> |
<HR> |
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== --> |
<A NAME="navbar_bottom"><!-- --></A> |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
<TR> |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
<A NAME="navbar_bottom_firstrow"><!-- --></A> |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
<TR ALIGN="center" VALIGN="top"> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Folder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
</TR> |
</TABLE> |
</TD> |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
</EM> |
</TD> |
</TR> |
|
<TR> |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail"><B>PREV CLASS</B></A> |
<A HREF="../../javax/mail/FolderClosedException.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD> |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
<A HREF="../../index.html?javax/mail/Folder.html" target="_top"><B>FRAMES</B></A> |
<A HREF="Folder.html" target="_top"><B>NO FRAMES</B></A> |
<SCRIPT type="text/javascript"> |
<!-- |
if(window==top) { |
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); |
} |
//--> |
</SCRIPT> |
<NOSCRIPT> |
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A> |
</NOSCRIPT> |
|
|
</FONT></TD> |
</TR> |
<TR> |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
</TR> |
</TABLE> |
<A NAME="skip-navbar_bottom"></A> |
<!-- ======== END OF BOTTOM NAVBAR ======= --> |
|
<HR> |
Copyright © 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved. |
</BODY> |
</HTML> |