Subversion Repositories javautils

Rev

Blame | Last modification | View Log | RSS feed

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:37 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. Folder (JavaMail API documentation)
  9. </TITLE>
  10.  
  11. <META NAME="date" CONTENT="2009-11-17">
  12.  
  13. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
  14.  
  15. <SCRIPT type="text/javascript">
  16. function windowTitle()
  17. {
  18.     if (location.href.indexOf('is-external=true') == -1) {
  19.         parent.document.title="Folder (JavaMail API documentation)";
  20.     }
  21. }
  22. </SCRIPT>
  23. <NOSCRIPT>
  24. </NOSCRIPT>
  25.  
  26. </HEAD>
  27.  
  28. <BODY BGCOLOR="white" onload="windowTitle();">
  29. <HR>
  30.  
  31.  
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <A NAME="navbar_top"><!-- --></A>
  34. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  35. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  36. <TR>
  37. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  38. <A NAME="navbar_top_firstrow"><!-- --></A>
  39. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  40.   <TR ALIGN="center" VALIGN="top">
  41.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  42.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  43.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  44.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Folder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  45.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  46.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  47.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  48.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  49.   </TR>
  50. </TABLE>
  51. </TD>
  52. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  53. </EM>
  54. </TD>
  55. </TR>
  56.  
  57. <TR>
  58. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  59. &nbsp;<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/FolderClosedException.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../index.html?javax/mail/Folder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="Folder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  64. &nbsp;<SCRIPT type="text/javascript">
  65.   <!--
  66.   if(window==top) {
  67.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  68.   }
  69.   //-->
  70. </SCRIPT>
  71. <NOSCRIPT>
  72.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  73. </NOSCRIPT>
  74.  
  75.  
  76. </FONT></TD>
  77. </TR>
  78. <TR>
  79. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  80.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  81. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  82. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  83. </TR>
  84. </TABLE>
  85. <A NAME="skip-navbar_top"></A>
  86. <!-- ========= END OF TOP NAVBAR ========= -->
  87.  
  88. <HR>
  89. <!-- ======== START OF CLASS DATA ======== -->
  90. <H2>
  91. <FONT SIZE="-1">
  92. javax.mail</FONT>
  93. <BR>
  94. Class Folder</H2>
  95. <PRE>
  96. <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>
  97.   <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javax.mail.Folder</B>
  98. </PRE>
  99. <DL>
  100. <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>
  101. </DL>
  102. <HR>
  103. <DL>
  104. <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>
  105. </PRE>
  106.  
  107. <P>
  108. Folder is an abstract class that represents a folder for mail
  109.  messages. Subclasses implement protocol specific Folders.<p>
  110.  
  111.  Folders can contain Messages, other Folders or both, thus providing
  112.  a tree-like hierarchy rooted at the Store's default folder. (Note
  113. that some Folder implementations may not allow both Messages and
  114. other Folders in the same Folder).<p>
  115.  
  116. The interpretation of folder names is implementation dependent.
  117. The different levels of hierarchy in a folder's full name
  118.  are separated from each other by the hierarchy delimiter
  119.  character.<p>
  120.  
  121.  The case-insensitive full folder name (that is, the full name
  122.  relative to the default folder for a Store) <strong>INBOX</strong>
  123.  is reserved to mean the "primary folder for this user on this
  124. server".  Not all Stores will provide an INBOX folder, and not
  125.  all users will have an INBOX folder at all times.  The name
  126.  <strong>INBOX</strong> is reserved to refer to this folder,
  127.  when it exists, in Stores that provide it. <p>
  128.  
  129.  A Folder object obtained from a Store need not actually exist
  130.  in the backend store. The <code>exists</code> method tests whether
  131.  the folder exists or not. The <code>create</code> method
  132.  creates a Folder. <p>
  133.  
  134.  A Folder is initially in the closed state. Certain methods are valid
  135.  in this state; the documentation for those methods note this.  A
  136.  Folder is opened by calling its 'open' method. All Folder methods,
  137.  except <code>open</code>, <code>delete</code> and
  138.  <code>renameTo</code>, are valid in this state. <p>
  139.  
  140.  The only way to get a Folder is by invoking the
  141.  <code>getFolder</code> method on Store, Folder, or Session, or by invoking
  142.  the <code>list</code> or <code>listSubscribed</code> methods
  143.  on Folder. Folder objects returned by the above methods are not
  144.  cached by the Store. Thus, invoking the <code>getFolder</code> method
  145.  with the same folder name multiple times will return distinct Folder
  146.  objects.  Likewise for the <code>list</code> and <code>listSubscribed</code>
  147.  methods. <p>
  148.  
  149.  The Message objects within the Folder are cached by the Folder.
  150.  Thus, invoking <code>getMessage(msgno)</code> on the same message number
  151.  multiple times will return the same Message object, until an
  152.  expunge is done on this Folder. <p>
  153.  
  154.  Message objects from a Folder are only valid while a Folder is open
  155.  and should not be accessed after the Folder is closed, even if the
  156.  Folder is subsequently reopened.  Instead, new Message objects must
  157.  be fetched from the Folder after the Folder is reopened. <p>
  158.  
  159.  Note that a Message's message number can change within a
  160. session if the containing Folder is expunged using the expunge
  161. method.  Clients that use message numbers as references to messages
  162. should be aware of this and should be prepared to deal with
  163. situation (probably by flushing out existing message number references
  164. and reloading them). Because of this complexity, it is better for
  165. clients to use Message objects as references to messages, rather than
  166. message numbers. Expunged Message objects still have to be
  167. pruned, but other Message objects in that folder are not affected by the
  168. expunge.
  169. <P>
  170.  
  171. <P>
  172. <HR>
  173.  
  174. <P>
  175. <!-- =========== FIELD SUMMARY =========== -->
  176.  
  177. <A NAME="field_summary"><!-- --></A>
  178. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  179. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  180. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  181. <B>Field Summary</B></FONT></TH>
  182. </TR>
  183. <TR BGCOLOR="white" CLASS="TableRowColor">
  184. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  185. <CODE>static&nbsp;int</CODE></FONT></TD>
  186. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#HOLDS_FOLDERS">HOLDS_FOLDERS</A></B></CODE>
  187.  
  188. <BR>
  189. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This folder can contain other folders</TD>
  190. </TR>
  191. <TR BGCOLOR="white" CLASS="TableRowColor">
  192. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  193. <CODE>static&nbsp;int</CODE></FONT></TD>
  194. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#HOLDS_MESSAGES">HOLDS_MESSAGES</A></B></CODE>
  195.  
  196. <BR>
  197. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This folder can contain messages</TD>
  198. </TR>
  199. <TR BGCOLOR="white" CLASS="TableRowColor">
  200. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  201. <CODE>protected &nbsp;int</CODE></FONT></TD>
  202. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#mode">mode</A></B></CODE>
  203.  
  204. <BR>
  205. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The open mode of this folder.</TD>
  206. </TR>
  207. <TR BGCOLOR="white" CLASS="TableRowColor">
  208. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  209. <CODE>static&nbsp;int</CODE></FONT></TD>
  210. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#READ_ONLY">READ_ONLY</A></B></CODE>
  211.  
  212. <BR>
  213. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Folder is read only.</TD>
  214. </TR>
  215. <TR BGCOLOR="white" CLASS="TableRowColor">
  216. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  217. <CODE>static&nbsp;int</CODE></FONT></TD>
  218. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#READ_WRITE">READ_WRITE</A></B></CODE>
  219.  
  220. <BR>
  221. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The state and contents of this folder can be modified.</TD>
  222. </TR>
  223. <TR BGCOLOR="white" CLASS="TableRowColor">
  224. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  225. <CODE>protected &nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD>
  226. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#store">store</A></B></CODE>
  227.  
  228. <BR>
  229. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parent store.</TD>
  230. </TR>
  231. </TABLE>
  232. &nbsp;
  233. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  234.  
  235. <A NAME="constructor_summary"><!-- --></A>
  236. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  237. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  238. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  239. <B>Constructor Summary</B></FONT></TH>
  240. </TR>
  241. <TR BGCOLOR="white" CLASS="TableRowColor">
  242. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  243. <CODE>protected </CODE></FONT></TD>
  244. <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>&nbsp;store)</CODE>
  245.  
  246. <BR>
  247. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that takes a Store object.</TD>
  248. </TR>
  249. </TABLE>
  250. &nbsp;
  251. <!-- ========== METHOD SUMMARY =========== -->
  252.  
  253. <A NAME="method_summary"><!-- --></A>
  254. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  255. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  256. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  257. <B>Method Summary</B></FONT></TH>
  258. </TR>
  259. <TR BGCOLOR="white" CLASS="TableRowColor">
  260. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  261. <CODE>&nbsp;void</CODE></FONT></TD>
  262. <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>&nbsp;l)</CODE>
  263.  
  264. <BR>
  265. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a listener for Connection events on this Folder.</TD>
  266. </TR>
  267. <TR BGCOLOR="white" CLASS="TableRowColor">
  268. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  269. <CODE>&nbsp;void</CODE></FONT></TD>
  270. <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>&nbsp;l)</CODE>
  271.  
  272. <BR>
  273. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a listener for Folder events on this Folder.</TD>
  274. </TR>
  275. <TR BGCOLOR="white" CLASS="TableRowColor">
  276. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  277. <CODE>&nbsp;void</CODE></FONT></TD>
  278. <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>&nbsp;l)</CODE>
  279.  
  280. <BR>
  281. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a listener for MessageChanged events on this Folder.</TD>
  282. </TR>
  283. <TR BGCOLOR="white" CLASS="TableRowColor">
  284. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  285. <CODE>&nbsp;void</CODE></FONT></TD>
  286. <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>&nbsp;l)</CODE>
  287.  
  288. <BR>
  289. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a listener for MessageCount events on this Folder.</TD>
  290. </TR>
  291. <TR BGCOLOR="white" CLASS="TableRowColor">
  292. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  293. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  294. <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>[]&nbsp;msgs)</CODE>
  295.  
  296. <BR>
  297. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append given Messages to this folder.</TD>
  298. </TR>
  299. <TR BGCOLOR="white" CLASS="TableRowColor">
  300. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  301. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  302. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#close(boolean)">close</A></B>(boolean&nbsp;expunge)</CODE>
  303.  
  304. <BR>
  305. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close this Folder.</TD>
  306. </TR>
  307. <TR BGCOLOR="white" CLASS="TableRowColor">
  308. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  309. <CODE>&nbsp;void</CODE></FONT></TD>
  310. <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>[]&nbsp;msgs,
  311.             <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder)</CODE>
  312.  
  313. <BR>
  314. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the specified Messages from this Folder into another
  315. Folder.</TD>
  316. </TR>
  317. <TR BGCOLOR="white" CLASS="TableRowColor">
  318. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  319. <CODE>abstract &nbsp;boolean</CODE></FONT></TD>
  320. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#create(int)">create</A></B>(int&nbsp;type)</CODE>
  321.  
  322. <BR>
  323. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create this folder on the Store.</TD>
  324. </TR>
  325. <TR BGCOLOR="white" CLASS="TableRowColor">
  326. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  327. <CODE>abstract &nbsp;boolean</CODE></FONT></TD>
  328. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#delete(boolean)">delete</A></B>(boolean&nbsp;recurse)</CODE>
  329.  
  330. <BR>
  331. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete this Folder.</TD>
  332. </TR>
  333. <TR BGCOLOR="white" CLASS="TableRowColor">
  334. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  335. <CODE>abstract &nbsp;boolean</CODE></FONT></TD>
  336. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#exists()">exists</A></B>()</CODE>
  337.  
  338. <BR>
  339. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests if this folder physically exists on the Store.</TD>
  340. </TR>
  341. <TR BGCOLOR="white" CLASS="TableRowColor">
  342. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  343. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD>
  344. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#expunge()">expunge</A></B>()</CODE>
  345.  
  346. <BR>
  347. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Expunge (permanently remove) messages marked DELETED.</TD>
  348. </TR>
  349. <TR BGCOLOR="white" CLASS="TableRowColor">
  350. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  351. <CODE>&nbsp;void</CODE></FONT></TD>
  352. <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>[]&nbsp;msgs,
  353.      <A HREF="../../javax/mail/FetchProfile.html" title="class in javax.mail">FetchProfile</A>&nbsp;fp)</CODE>
  354.  
  355. <BR>
  356. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prefetch the items specified in the FetchProfile for the
  357. given Messages.</TD>
  358. </TR>
  359. <TR BGCOLOR="white" CLASS="TableRowColor">
  360. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  361. <CODE>protected &nbsp;void</CODE></FONT></TD>
  362. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#finalize()">finalize</A></B>()</CODE>
  363.  
  364. <BR>
  365. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  366. </TR>
  367. <TR BGCOLOR="white" CLASS="TableRowColor">
  368. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  369. <CODE>&nbsp;int</CODE></FONT></TD>
  370. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getDeletedMessageCount()">getDeletedMessageCount</A></B>()</CODE>
  371.  
  372. <BR>
  373. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of deleted messages in this Folder.</TD>
  374. </TR>
  375. <TR BGCOLOR="white" CLASS="TableRowColor">
  376. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  377. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD>
  378. <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>&nbsp;name)</CODE>
  379.  
  380. <BR>
  381. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Folder object corresponding to the given name.</TD>
  382. </TR>
  383. <TR BGCOLOR="white" CLASS="TableRowColor">
  384. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  385. <CODE>abstract &nbsp;<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>
  386. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getFullName()">getFullName</A></B>()</CODE>
  387.  
  388. <BR>
  389. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full name of this Folder.</TD>
  390. </TR>
  391. <TR BGCOLOR="white" CLASS="TableRowColor">
  392. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  393. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></FONT></TD>
  394. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessage(int)">getMessage</A></B>(int&nbsp;msgnum)</CODE>
  395.  
  396. <BR>
  397. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Message object corresponding to the given message
  398. number.</TD>
  399. </TR>
  400. <TR BGCOLOR="white" CLASS="TableRowColor">
  401. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  402. <CODE>abstract &nbsp;int</CODE></FONT></TD>
  403. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessageCount()">getMessageCount</A></B>()</CODE>
  404.  
  405. <BR>
  406. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get total number of messages in this Folder.</TD>
  407. </TR>
  408. <TR BGCOLOR="white" CLASS="TableRowColor">
  409. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  410. <CODE>&nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD>
  411. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessages()">getMessages</A></B>()</CODE>
  412.  
  413. <BR>
  414. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all Message objects from this Folder.</TD>
  415. </TR>
  416. <TR BGCOLOR="white" CLASS="TableRowColor">
  417. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  418. <CODE>&nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD>
  419. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessages(int[])">getMessages</A></B>(int[]&nbsp;msgnums)</CODE>
  420.  
  421. <BR>
  422. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Message objects for message numbers specified in
  423. the array.</TD>
  424. </TR>
  425. <TR BGCOLOR="white" CLASS="TableRowColor">
  426. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  427. <CODE>&nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD>
  428. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMessages(int, int)">getMessages</A></B>(int&nbsp;start,
  429.            int&nbsp;end)</CODE>
  430.  
  431. <BR>
  432. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Message objects for message numbers ranging from start
  433. through end, both start and end inclusive.</TD>
  434. </TR>
  435. <TR BGCOLOR="white" CLASS="TableRowColor">
  436. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  437. <CODE>&nbsp;int</CODE></FONT></TD>
  438. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getMode()">getMode</A></B>()</CODE>
  439.  
  440. <BR>
  441. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the open mode of this folder.</TD>
  442. </TR>
  443. <TR BGCOLOR="white" CLASS="TableRowColor">
  444. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  445. <CODE>abstract &nbsp;<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>
  446. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getName()">getName</A></B>()</CODE>
  447.  
  448. <BR>
  449. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of this Folder.</TD>
  450. </TR>
  451. <TR BGCOLOR="white" CLASS="TableRowColor">
  452. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  453. <CODE>&nbsp;int</CODE></FONT></TD>
  454. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getNewMessageCount()">getNewMessageCount</A></B>()</CODE>
  455.  
  456. <BR>
  457. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of new messages in this Folder.</TD>
  458. </TR>
  459. <TR BGCOLOR="white" CLASS="TableRowColor">
  460. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  461. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD>
  462. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getParent()">getParent</A></B>()</CODE>
  463.  
  464. <BR>
  465. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the parent folder of this folder.</TD>
  466. </TR>
  467. <TR BGCOLOR="white" CLASS="TableRowColor">
  468. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  469. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></CODE></FONT></TD>
  470. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getPermanentFlags()">getPermanentFlags</A></B>()</CODE>
  471.  
  472. <BR>
  473. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the permanent flags supported by this Folder.</TD>
  474. </TR>
  475. <TR BGCOLOR="white" CLASS="TableRowColor">
  476. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  477. <CODE>abstract &nbsp;char</CODE></FONT></TD>
  478. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getSeparator()">getSeparator</A></B>()</CODE>
  479.  
  480. <BR>
  481. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the delimiter character that separates this Folder's pathname
  482.  from the names of immediate subfolders.</TD>
  483. </TR>
  484. <TR BGCOLOR="white" CLASS="TableRowColor">
  485. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  486. <CODE>&nbsp;<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></CODE></FONT></TD>
  487. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getStore()">getStore</A></B>()</CODE>
  488.  
  489. <BR>
  490. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Store that owns this Folder object.</TD>
  491. </TR>
  492. <TR BGCOLOR="white" CLASS="TableRowColor">
  493. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  494. <CODE>abstract &nbsp;int</CODE></FONT></TD>
  495. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getType()">getType</A></B>()</CODE>
  496.  
  497. <BR>
  498. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the type of this Folder, that is, whether this folder can hold
  499.  messages or subfolders or both.</TD>
  500. </TR>
  501. <TR BGCOLOR="white" CLASS="TableRowColor">
  502. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  503. <CODE>&nbsp;int</CODE></FONT></TD>
  504. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getUnreadMessageCount()">getUnreadMessageCount</A></B>()</CODE>
  505.  
  506. <BR>
  507. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the total number of unread messages in this Folder.</TD>
  508. </TR>
  509. <TR BGCOLOR="white" CLASS="TableRowColor">
  510. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  511. <CODE>&nbsp;<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A></CODE></FONT></TD>
  512. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#getURLName()">getURLName</A></B>()</CODE>
  513.  
  514. <BR>
  515. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a URLName representing this folder.</TD>
  516. </TR>
  517. <TR BGCOLOR="white" CLASS="TableRowColor">
  518. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  519. <CODE>abstract &nbsp;boolean</CODE></FONT></TD>
  520. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#hasNewMessages()">hasNewMessages</A></B>()</CODE>
  521.  
  522. <BR>
  523. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this Folder has new messages since the last time
  524.  this indication was reset.</TD>
  525. </TR>
  526. <TR BGCOLOR="white" CLASS="TableRowColor">
  527. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  528. <CODE>abstract &nbsp;boolean</CODE></FONT></TD>
  529. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#isOpen()">isOpen</A></B>()</CODE>
  530.  
  531. <BR>
  532. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether this Folder is in the 'open' state.</TD>
  533. </TR>
  534. <TR BGCOLOR="white" CLASS="TableRowColor">
  535. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  536. <CODE>&nbsp;boolean</CODE></FONT></TD>
  537. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#isSubscribed()">isSubscribed</A></B>()</CODE>
  538.  
  539. <BR>
  540. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this Folder is subscribed.</TD>
  541. </TR>
  542. <TR BGCOLOR="white" CLASS="TableRowColor">
  543. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  544. <CODE>&nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD>
  545. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#list()">list</A></B>()</CODE>
  546.  
  547. <BR>
  548. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that returns the list of folders under this
  549.  Folder.</TD>
  550. </TR>
  551. <TR BGCOLOR="white" CLASS="TableRowColor">
  552. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  553. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD>
  554. <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>&nbsp;pattern)</CODE>
  555.  
  556. <BR>
  557. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of Folders belonging to this Folder's namespace
  558. that match the specified pattern.</TD>
  559. </TR>
  560. <TR BGCOLOR="white" CLASS="TableRowColor">
  561. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  562. <CODE>&nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD>
  563. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#listSubscribed()">listSubscribed</A></B>()</CODE>
  564.  
  565. <BR>
  566. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that returns the list of subscribed folders
  567. under this Folder.</TD>
  568. </TR>
  569. <TR BGCOLOR="white" CLASS="TableRowColor">
  570. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  571. <CODE>&nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[]</CODE></FONT></TD>
  572. <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>&nbsp;pattern)</CODE>
  573.  
  574. <BR>
  575. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of subscribed Folders belonging to this Folder's
  576.  namespace that match the specified pattern.</TD>
  577. </TR>
  578. <TR BGCOLOR="white" CLASS="TableRowColor">
  579. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  580. <CODE>protected &nbsp;void</CODE></FONT></TD>
  581. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyConnectionListeners(int)">notifyConnectionListeners</A></B>(int&nbsp;type)</CODE>
  582.  
  583. <BR>
  584. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all ConnectionListeners.</TD>
  585. </TR>
  586. <TR BGCOLOR="white" CLASS="TableRowColor">
  587. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  588. <CODE>protected &nbsp;void</CODE></FONT></TD>
  589. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyFolderListeners(int)">notifyFolderListeners</A></B>(int&nbsp;type)</CODE>
  590.  
  591. <BR>
  592. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all FolderListeners registered on this Folder and
  593.  this folder's Store.</TD>
  594. </TR>
  595. <TR BGCOLOR="white" CLASS="TableRowColor">
  596. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  597. <CODE>protected &nbsp;void</CODE></FONT></TD>
  598. <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>&nbsp;folder)</CODE>
  599.  
  600. <BR>
  601. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all FolderListeners registered on this Folder and
  602. this folder's Store about the renaming of this folder.</TD>
  603. </TR>
  604. <TR BGCOLOR="white" CLASS="TableRowColor">
  605. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  606. <CODE>protected &nbsp;void</CODE></FONT></TD>
  607. <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>[]&nbsp;msgs)</CODE>
  608.  
  609. <BR>
  610. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all MessageCountListeners about the addition of messages
  611.  into this folder.</TD>
  612. </TR>
  613. <TR BGCOLOR="white" CLASS="TableRowColor">
  614. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  615. <CODE>protected &nbsp;void</CODE></FONT></TD>
  616. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyMessageChangedListeners(int, javax.mail.Message)">notifyMessageChangedListeners</A></B>(int&nbsp;type,
  617.                               <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>&nbsp;msg)</CODE>
  618.  
  619. <BR>
  620. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all MessageChangedListeners.</TD>
  621. </TR>
  622. <TR BGCOLOR="white" CLASS="TableRowColor">
  623. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  624. <CODE>protected &nbsp;void</CODE></FONT></TD>
  625. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#notifyMessageRemovedListeners(boolean, javax.mail.Message[])">notifyMessageRemovedListeners</A></B>(boolean&nbsp;removed,
  626.                               <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs)</CODE>
  627.  
  628. <BR>
  629. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify all MessageCountListeners about the removal of messages
  630.  from this Folder.</TD>
  631. </TR>
  632. <TR BGCOLOR="white" CLASS="TableRowColor">
  633. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  634. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  635. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#open(int)">open</A></B>(int&nbsp;mode)</CODE>
  636.  
  637. <BR>
  638. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open this Folder.</TD>
  639. </TR>
  640. <TR BGCOLOR="white" CLASS="TableRowColor">
  641. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  642. <CODE>&nbsp;void</CODE></FONT></TD>
  643. <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>&nbsp;l)</CODE>
  644.  
  645. <BR>
  646. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a Connection event listener.</TD>
  647. </TR>
  648. <TR BGCOLOR="white" CLASS="TableRowColor">
  649. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  650. <CODE>&nbsp;void</CODE></FONT></TD>
  651. <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>&nbsp;l)</CODE>
  652.  
  653. <BR>
  654. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a Folder event listener.</TD>
  655. </TR>
  656. <TR BGCOLOR="white" CLASS="TableRowColor">
  657. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  658. <CODE>&nbsp;void</CODE></FONT></TD>
  659. <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>&nbsp;l)</CODE>
  660.  
  661. <BR>
  662. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a MessageChanged listener.</TD>
  663. </TR>
  664. <TR BGCOLOR="white" CLASS="TableRowColor">
  665. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  666. <CODE>&nbsp;void</CODE></FONT></TD>
  667. <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>&nbsp;l)</CODE>
  668.  
  669. <BR>
  670. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a MessageCount listener.</TD>
  671. </TR>
  672. <TR BGCOLOR="white" CLASS="TableRowColor">
  673. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  674. <CODE>abstract &nbsp;boolean</CODE></FONT></TD>
  675. <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>&nbsp;f)</CODE>
  676.  
  677. <BR>
  678. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rename this Folder.</TD>
  679. </TR>
  680. <TR BGCOLOR="white" CLASS="TableRowColor">
  681. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  682. <CODE>&nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD>
  683. <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>&nbsp;term)</CODE>
  684.  
  685. <BR>
  686. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search this Folder for messages matching the specified
  687.  search criterion.</TD>
  688. </TR>
  689. <TR BGCOLOR="white" CLASS="TableRowColor">
  690. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  691. <CODE>&nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]</CODE></FONT></TD>
  692. <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>&nbsp;term,
  693.        <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs)</CODE>
  694.  
  695. <BR>
  696. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search the given array of messages for those that match the
  697.  specified search criterion.</TD>
  698. </TR>
  699. <TR BGCOLOR="white" CLASS="TableRowColor">
  700. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  701. <CODE>&nbsp;void</CODE></FONT></TD>
  702. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#setFlags(int[], javax.mail.Flags, boolean)">setFlags</A></B>(int[]&nbsp;msgnums,
  703.          <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  704.          boolean&nbsp;value)</CODE>
  705.  
  706. <BR>
  707. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified flags on the messages whose message numbers
  708.  are in the array.</TD>
  709. </TR>
  710. <TR BGCOLOR="white" CLASS="TableRowColor">
  711. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  712. <CODE>&nbsp;void</CODE></FONT></TD>
  713. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#setFlags(int, int, javax.mail.Flags, boolean)">setFlags</A></B>(int&nbsp;start,
  714.          int&nbsp;end,
  715.          <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  716.          boolean&nbsp;value)</CODE>
  717.  
  718. <BR>
  719. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified flags on the messages numbered from start
  720.  through end, both start and end inclusive.</TD>
  721. </TR>
  722. <TR BGCOLOR="white" CLASS="TableRowColor">
  723. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  724. <CODE>&nbsp;void</CODE></FONT></TD>
  725. <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>[]&nbsp;msgs,
  726.          <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  727.          boolean&nbsp;value)</CODE>
  728.  
  729. <BR>
  730. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified flags on the messages specified in the array.</TD>
  731. </TR>
  732. <TR BGCOLOR="white" CLASS="TableRowColor">
  733. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  734. <CODE>&nbsp;void</CODE></FONT></TD>
  735. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#setSubscribed(boolean)">setSubscribed</A></B>(boolean&nbsp;subscribe)</CODE>
  736.  
  737. <BR>
  738. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subscribe or unsubscribe this Folder.</TD>
  739. </TR>
  740. <TR BGCOLOR="white" CLASS="TableRowColor">
  741. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  742. <CODE>&nbsp;<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>
  743. <TD><CODE><B><A HREF="../../javax/mail/Folder.html#toString()">toString</A></B>()</CODE>
  744.  
  745. <BR>
  746. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;override the default toString(), it will return the String
  747.  from Folder.getFullName() or if that is null, it will use
  748.  the default toString() behavior.</TD>
  749. </TR>
  750. </TABLE>
  751. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  752. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  753. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  754. <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>
  755. </TR>
  756. <TR BGCOLOR="white" CLASS="TableRowColor">
  757. <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>
  758. </TR>
  759. </TABLE>
  760. &nbsp;
  761. <P>
  762.  
  763. <!-- ============ FIELD DETAIL =========== -->
  764.  
  765. <A NAME="field_detail"><!-- --></A>
  766. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  767. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  768. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  769. <B>Field Detail</B></FONT></TH>
  770. </TR>
  771. </TABLE>
  772.  
  773. <A NAME="store"><!-- --></A><H3>
  774. store</H3>
  775. <PRE>
  776. protected <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>store</B></PRE>
  777. <DL>
  778. <DD>The parent store.
  779. <P>
  780. <DL>
  781. </DL>
  782. </DL>
  783. <HR>
  784.  
  785. <A NAME="mode"><!-- --></A><H3>
  786. mode</H3>
  787. <PRE>
  788. protected int <B>mode</B></PRE>
  789. <DL>
  790. <DD>The open mode of this folder.  The open mode is
  791.  <code>Folder.READ_ONLY</code>, <code>Folder.READ_WRITE</code>,
  792.  or -1 if not known.
  793. <P>
  794. <DL>
  795. <DT><B>Since:</B></DT>
  796.   <DD>JavaMail 1.1</DD>
  797. </DL>
  798. </DL>
  799. <HR>
  800.  
  801. <A NAME="HOLDS_MESSAGES"><!-- --></A><H3>
  802. HOLDS_MESSAGES</H3>
  803. <PRE>
  804. public static final int <B>HOLDS_MESSAGES</B></PRE>
  805. <DL>
  806. <DD>This folder can contain messages
  807. <P>
  808. <DL>
  809. <DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.HOLDS_MESSAGES">Constant Field Values</A></DL>
  810. </DL>
  811. <HR>
  812.  
  813. <A NAME="HOLDS_FOLDERS"><!-- --></A><H3>
  814. HOLDS_FOLDERS</H3>
  815. <PRE>
  816. public static final int <B>HOLDS_FOLDERS</B></PRE>
  817. <DL>
  818. <DD>This folder can contain other folders
  819. <P>
  820. <DL>
  821. <DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.HOLDS_FOLDERS">Constant Field Values</A></DL>
  822. </DL>
  823. <HR>
  824.  
  825. <A NAME="READ_ONLY"><!-- --></A><H3>
  826. READ_ONLY</H3>
  827. <PRE>
  828. public static final int <B>READ_ONLY</B></PRE>
  829. <DL>
  830. <DD>The Folder is read only.  The state and contents of this
  831.  folder cannot be modified.
  832. <P>
  833. <DL>
  834. <DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.READ_ONLY">Constant Field Values</A></DL>
  835. </DL>
  836. <HR>
  837.  
  838. <A NAME="READ_WRITE"><!-- --></A><H3>
  839. READ_WRITE</H3>
  840. <PRE>
  841. public static final int <B>READ_WRITE</B></PRE>
  842. <DL>
  843. <DD>The state and contents of this folder can be modified.
  844. <P>
  845. <DL>
  846. <DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.mail.Folder.READ_WRITE">Constant Field Values</A></DL>
  847. </DL>
  848.  
  849. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  850.  
  851. <A NAME="constructor_detail"><!-- --></A>
  852. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  853. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  854. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  855. <B>Constructor Detail</B></FONT></TH>
  856. </TR>
  857. </TABLE>
  858.  
  859. <A NAME="Folder(javax.mail.Store)"><!-- --></A><H3>
  860. Folder</H3>
  861. <PRE>
  862. protected <B>Folder</B>(<A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A>&nbsp;store)</PRE>
  863. <DL>
  864. <DD>Constructor that takes a Store object.
  865. <P>
  866. <DL>
  867. <DT><B>Parameters:</B><DD><CODE>store</CODE> - the Store that holds this folder</DL>
  868. </DL>
  869.  
  870. <!-- ============ METHOD DETAIL ========== -->
  871.  
  872. <A NAME="method_detail"><!-- --></A>
  873. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  874. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  875. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  876. <B>Method Detail</B></FONT></TH>
  877. </TR>
  878. </TABLE>
  879.  
  880. <A NAME="getName()"><!-- --></A><H3>
  881. getName</H3>
  882. <PRE>
  883. 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>
  884. <DL>
  885. <DD>Returns the name of this Folder. <p>
  886.  
  887.  This method can be invoked on a closed Folder.
  888. <P>
  889. <DD><DL>
  890.  
  891. <DT><B>Returns:</B><DD>name of the Folder</DL>
  892. </DD>
  893. </DL>
  894. <HR>
  895.  
  896. <A NAME="getFullName()"><!-- --></A><H3>
  897. getFullName</H3>
  898. <PRE>
  899. 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>
  900. <DL>
  901. <DD>Returns the full name of this Folder. If the folder resides under
  902.  the root hierarchy of this Store, the returned name is relative
  903.  to the root. Otherwise an absolute name, starting with the
  904.  hierarchy delimiter, is returned. <p>
  905.  
  906.  This method can be invoked on a closed Folder.
  907. <P>
  908. <DD><DL>
  909.  
  910. <DT><B>Returns:</B><DD>full name of the Folder</DL>
  911. </DD>
  912. </DL>
  913. <HR>
  914.  
  915. <A NAME="getURLName()"><!-- --></A><H3>
  916. getURLName</H3>
  917. <PRE>
  918. public <A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A> <B>getURLName</B>()
  919.                    throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  920. <DL>
  921. <DD>Return a URLName representing this folder.  The returned URLName
  922.  does <em>not</em> include the password used to access the store.
  923. <P>
  924. <DD><DL>
  925.  
  926. <DT><B>Returns:</B><DD>the URLName representing this folder
  927. <DT><B>Throws:</B>
  928. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  929.   <DD>JavaMail 1.1</DD>
  930. <DT><B>See Also:</B><DD><A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL>
  931. </DD>
  932. </DL>
  933. <HR>
  934.  
  935. <A NAME="getStore()"><!-- --></A><H3>
  936. getStore</H3>
  937. <PRE>
  938. public <A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A> <B>getStore</B>()</PRE>
  939. <DL>
  940. <DD>Returns the Store that owns this Folder object.
  941.  This method can be invoked on a closed Folder.
  942. <P>
  943. <DD><DL>
  944.  
  945. <DT><B>Returns:</B><DD>the Store</DL>
  946. </DD>
  947. </DL>
  948. <HR>
  949.  
  950. <A NAME="getParent()"><!-- --></A><H3>
  951. getParent</H3>
  952. <PRE>
  953. public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getParent</B>()
  954.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  955. <DL>
  956. <DD>Returns the parent folder of this folder.
  957.  This method can be invoked on a closed Folder. If this folder
  958.  is the top of a folder hierarchy, this method returns null. <p>
  959.  
  960.  Note that since Folder objects are not cached, invoking this method
  961.  returns a new distinct Folder object.
  962. <P>
  963. <DD><DL>
  964.  
  965. <DT><B>Returns:</B><DD>Parent folder
  966. <DT><B>Throws:</B>
  967. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  968. </DD>
  969. </DL>
  970. <HR>
  971.  
  972. <A NAME="exists()"><!-- --></A><H3>
  973. exists</H3>
  974. <PRE>
  975. public abstract boolean <B>exists</B>()
  976.                         throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  977. <DL>
  978. <DD>Tests if this folder physically exists on the Store.
  979.  This method can be invoked on a closed Folder.
  980. <P>
  981. <DD><DL>
  982.  
  983. <DT><B>Returns:</B><DD>true if the folder exists, otherwise false
  984. <DT><B>Throws:</B>
  985. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - typically if the connection
  986.                         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>
  987. </DD>
  988. </DL>
  989. <HR>
  990.  
  991. <A NAME="list(java.lang.String)"><!-- --></A><H3>
  992. list</H3>
  993. <PRE>
  994. 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>&nbsp;pattern)
  995.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  996. <DL>
  997. <DD>Returns a list of Folders belonging to this Folder's namespace
  998. that match the specified pattern. Patterns may contain the wildcard
  999. characters <code>"%"</code>, which matches any character except hierarchy
  1000. delimiters, and <code>"*"</code>, which matches any character. <p>
  1001.  
  1002. As an example, given the folder hierarchy: <pre>
  1003.    Personal/
  1004.       Finance/
  1005.          Stocks
  1006.          Bonus
  1007.          StockOptions
  1008.       Jokes
  1009. </pre>
  1010. <code>list("*")</code> on "Personal" will return the whole
  1011. hierarchy. <br>
  1012. <code>list("%")</code> on "Personal" will return "Finance" and
  1013. "Jokes". <br>
  1014. <code>list("Jokes")</code> on "Personal" will return "Jokes".<br>
  1015. <code>list("Stock*")</code> on "Finance" will return "Stocks"
  1016. and "StockOptions". <p>
  1017.  
  1018. Folder objects are not cached by the Store, so invoking this
  1019. method on the same pattern multiple times will return that many
  1020. distinct Folder objects. <p>
  1021.  
  1022. This method can be invoked on a closed Folder.
  1023. <P>
  1024. <DD><DL>
  1025. <DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the match pattern
  1026. <DT><B>Returns:</B><DD>array of matching Folder objects. An empty
  1027.                        array is returned if no matching Folders exist.
  1028. <DT><B>Throws:</B>
  1029. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1030.                        not exist.
  1031. <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>
  1032. </DD>
  1033. </DL>
  1034. <HR>
  1035.  
  1036. <A NAME="listSubscribed(java.lang.String)"><!-- --></A><H3>
  1037. listSubscribed</H3>
  1038. <PRE>
  1039. 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>&nbsp;pattern)
  1040.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1041. <DL>
  1042. <DD>Returns a list of subscribed Folders belonging to this Folder's
  1043.  namespace that match the specified pattern. If the folder does
  1044.  not support subscription, this method should resolve to
  1045.  <code>list</code>.
  1046.  (The default implementation provided here, does just this).
  1047.  The pattern can contain wildcards as for <code>list</code>. <p>
  1048.  
  1049.  Note that, at a given level of the folder hierarchy, a particular
  1050.  folder may not be subscribed, but folders underneath that folder
  1051.  in the folder hierarchy may be subscribed.  In order to allow
  1052.  walking the folder hierarchy, such unsubscribed folders may be
  1053.  returned, indicating that a folder lower in the hierarchy is
  1054.  subscribed.  The <code>isSubscribed</code> method on a folder will
  1055.  tell whether any particular folder is actually subscribed. <p>
  1056.  
  1057.  Folder objects are not cached by the Store, so invoking this
  1058.  method on the same pattern multiple times will return that many
  1059.  distinct Folder objects. <p>
  1060.  
  1061.  This method can be invoked on a closed Folder.
  1062. <P>
  1063. <DD><DL>
  1064. <DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the match pattern
  1065. <DT><B>Returns:</B><DD>array of matching subscribed Folder objects. An
  1066.                         empty array is returned if no matching
  1067.                         subscribed folders exist.
  1068. <DT><B>Throws:</B>
  1069. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1070.                         not exist.
  1071. <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>
  1072. </DD>
  1073. </DL>
  1074. <HR>
  1075.  
  1076. <A NAME="list()"><!-- --></A><H3>
  1077. list</H3>
  1078. <PRE>
  1079. public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>list</B>()
  1080.               throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1081. <DL>
  1082. <DD>Convenience method that returns the list of folders under this
  1083.  Folder. This method just calls the <code>list(String pattern)</code>
  1084.  method with <code>"%"</code> as the match pattern. This method can
  1085.  be invoked on a closed Folder.
  1086. <P>
  1087. <DD><DL>
  1088.  
  1089. <DT><B>Returns:</B><DD>array of Folder objects under this Folder. An
  1090.                         empty array is returned if no subfolders exist.
  1091. <DT><B>Throws:</B>
  1092. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1093.                         not exist.
  1094. <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>
  1095. </DD>
  1096. </DL>
  1097. <HR>
  1098.  
  1099. <A NAME="listSubscribed()"><!-- --></A><H3>
  1100. listSubscribed</H3>
  1101. <PRE>
  1102. public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>listSubscribed</B>()
  1103.                         throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1104. <DL>
  1105. <DD>Convenience method that returns the list of subscribed folders
  1106.  under this Folder. This method just calls the
  1107.  <code>listSubscribed(String pattern)</code> method with <code>"%"</code>
  1108.  as the match pattern. This method can be invoked on a closed Folder.
  1109. <P>
  1110. <DD><DL>
  1111.  
  1112. <DT><B>Returns:</B><DD>array of subscribed Folder objects under this
  1113.                         Folder. An empty array is returned if no subscribed
  1114.                         subfolders exist.
  1115. <DT><B>Throws:</B>
  1116. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1117.                         not exist.
  1118. <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>
  1119. </DD>
  1120. </DL>
  1121. <HR>
  1122.  
  1123. <A NAME="getSeparator()"><!-- --></A><H3>
  1124. getSeparator</H3>
  1125. <PRE>
  1126. public abstract char <B>getSeparator</B>()
  1127.                            throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1128. <DL>
  1129. <DD>Return the delimiter character that separates this Folder's pathname
  1130. from the names of immediate subfolders. This method can be invoked
  1131. on a closed Folder.
  1132. <P>
  1133. <DD><DL>
  1134.  
  1135. <DT><B>Returns:</B><DD>Hierarchy separator character
  1136. <DT><B>Throws:</B>
  1137. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if the implementation
  1138.                        requires the folder to exist, but it does not
  1139. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1140. </DD>
  1141. </DL>
  1142. <HR>
  1143.  
  1144. <A NAME="getType()"><!-- --></A><H3>
  1145. getType</H3>
  1146. <PRE>
  1147. public abstract int <B>getType</B>()
  1148.                     throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1149. <DL>
  1150. <DD>Returns the type of this Folder, that is, whether this folder can hold
  1151. messages or subfolders or both. The returned value is an integer
  1152. bitfield with the appropriate bits set. This method can be invoked
  1153. on a closed folder.
  1154. <P>
  1155. <DD><DL>
  1156.  
  1157. <DT><B>Returns:</B><DD>integer with appropriate bits set
  1158. <DT><B>Throws:</B>
  1159. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1160.                        not exist.
  1161. <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>,
  1162. <A HREF="../../javax/mail/Folder.html#HOLDS_MESSAGES"><CODE>HOLDS_MESSAGES</CODE></A></DL>
  1163. </DD>
  1164. </DL>
  1165. <HR>
  1166.  
  1167. <A NAME="create(int)"><!-- --></A><H3>
  1168. create</H3>
  1169. <PRE>
  1170. public abstract boolean <B>create</B>(int&nbsp;type)
  1171.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1172. <DL>
  1173. <DD>Create this folder on the Store. When this folder is created, any
  1174. folders in its path that do not exist are also created. <p>
  1175.  
  1176. If the creation is successful, a CREATED FolderEvent is delivered
  1177. to any FolderListeners registered on this Folder and this Store.
  1178. <P>
  1179. <DD><DL>
  1180. <DT><B>Parameters:</B><DD><CODE>type</CODE> - The type of this folder.
  1181. <DT><B>Returns:</B><DD>true if the creation succeeds, else false.
  1182. <DT><B>Throws:</B>
  1183. <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>,
  1184. <A HREF="../../javax/mail/Folder.html#HOLDS_MESSAGES"><CODE>HOLDS_MESSAGES</CODE></A>,
  1185. <A HREF="../../javax/mail/event/FolderEvent.html" title="class in javax.mail.event"><CODE>FolderEvent</CODE></A></DL>
  1186. </DD>
  1187. </DL>
  1188. <HR>
  1189.  
  1190. <A NAME="isSubscribed()"><!-- --></A><H3>
  1191. isSubscribed</H3>
  1192. <PRE>
  1193. public boolean <B>isSubscribed</B>()</PRE>
  1194. <DL>
  1195. <DD>Returns true if this Folder is subscribed. <p>
  1196.  
  1197. This method can be invoked on a closed Folder. <p>
  1198.  
  1199. The default implementation provided here just returns true.
  1200. <P>
  1201. <DD><DL>
  1202.  
  1203. <DT><B>Returns:</B><DD>true if this Folder is subscribed</DL>
  1204. </DD>
  1205. </DL>
  1206. <HR>
  1207.  
  1208. <A NAME="setSubscribed(boolean)"><!-- --></A><H3>
  1209. setSubscribed</H3>
  1210. <PRE>
  1211. public void <B>setSubscribed</B>(boolean&nbsp;subscribe)
  1212.                   throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1213. <DL>
  1214. <DD>Subscribe or unsubscribe this Folder. Not all Stores support
  1215. subscription. <p>
  1216.  
  1217. This method can be invoked on a closed Folder. <p>
  1218.  
  1219. The implementation provided here just throws the
  1220. MethodNotSupportedException.
  1221. <P>
  1222. <DD><DL>
  1223. <DT><B>Parameters:</B><DD><CODE>subscribe</CODE> - true to subscribe, false to unsubscribe
  1224. <DT><B>Throws:</B>
  1225. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1226.                        not exist.
  1227. <DD><CODE><A HREF="../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail">MethodNotSupportedException</A></CODE> - if this store
  1228.                        does not support subscription
  1229. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1230. </DD>
  1231. </DL>
  1232. <HR>
  1233.  
  1234. <A NAME="hasNewMessages()"><!-- --></A><H3>
  1235. hasNewMessages</H3>
  1236. <PRE>
  1237. public abstract boolean <B>hasNewMessages</B>()
  1238.                                throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1239. <DL>
  1240. <DD>Returns true if this Folder has new messages since the last time
  1241. this indication was reset.  When this indication is set or reset
  1242. depends on the Folder implementation (and in the case of IMAP,
  1243. depends on the server).  This method can be used to implement
  1244. a lightweight "check for new mail" operation on a Folder without
  1245. opening it.  (For example, a thread that monitors a mailbox and
  1246. flags when it has new mail.)  This method should indicate whether
  1247. any messages in the Folder have the <code>RECENT</code> flag set. <p>
  1248.  
  1249. Note that this is not an incremental check for new mail, i.e.,
  1250. it cannot be used to determine whether any new messages have
  1251. arrived since the last time this method was invoked. To
  1252. implement incremental checks, the Folder needs to be opened. <p>
  1253.  
  1254. This method can be invoked on a closed Folder that can contain
  1255. Messages.
  1256. <P>
  1257. <DD><DL>
  1258.  
  1259. <DT><B>Returns:</B><DD>true if the Store has new Messages
  1260. <DT><B>Throws:</B>
  1261. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1262.                        not exist.
  1263. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1264. </DD>
  1265. </DL>
  1266. <HR>
  1267.  
  1268. <A NAME="getFolder(java.lang.String)"><!-- --></A><H3>
  1269. getFolder</H3>
  1270. <PRE>
  1271. 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>&nbsp;name)
  1272.                          throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1273. <DL>
  1274. <DD>Return the Folder object corresponding to the given name. Note that
  1275. this folder does not physically have to exist in the Store. The
  1276. <code>exists()</code> method on a Folder indicates whether it really
  1277. exists on the Store. <p>
  1278.  
  1279. In some Stores, name can be an absolute path if it starts with the
  1280. hierarchy delimiter.  Otherwise, it is interpreted relative to
  1281. this Folder. <p>
  1282.  
  1283. Folder objects are not cached by the Store, so invoking this
  1284. method on the same name multiple times will return that many
  1285. distinct Folder objects. <p>
  1286.  
  1287. This method can be invoked on a closed Folder.
  1288. <P>
  1289. <DD><DL>
  1290. <DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the Folder
  1291. <DT><B>Returns:</B><DD>Folder object
  1292. <DT><B>Throws:</B>
  1293. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1294. </DD>
  1295. </DL>
  1296. <HR>
  1297.  
  1298. <A NAME="delete(boolean)"><!-- --></A><H3>
  1299. delete</H3>
  1300. <PRE>
  1301. public abstract boolean <B>delete</B>(boolean&nbsp;recurse)
  1302.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1303. <DL>
  1304. <DD>Delete this Folder. This method will succeed only on a closed
  1305. Folder. <p>
  1306.  
  1307. The <code>recurse</code> flag controls whether the deletion affects
  1308. subfolders or not. If true, all subfolders are deleted, then this
  1309. folder itself is deleted. If false, the behaviour is dependent on
  1310. the folder type and is elaborated below: <p>
  1311.  
  1312. <ul>
  1313. <li>
  1314. The folder can contain only messages: (type == HOLDS_MESSAGES).
  1315. <br>
  1316. All messages within the folder are removed. The folder
  1317. itself is then removed. An appropriate FolderEvent is generated by
  1318. the Store and this folder. <p>
  1319.  
  1320. <li>
  1321. The folder can contain only subfolders: (type == HOLDS_FOLDERS).
  1322. <br>
  1323. If this folder is empty (does not contain any
  1324. subfolders at all), it is removed. An appropriate FolderEvent is
  1325. generated by the Store and this folder.<br>
  1326. If this folder contains any subfolders, the delete fails
  1327. and returns false. <p>
  1328.  
  1329. <li>
  1330. The folder can contain subfolders as well as messages: <br>
  1331. If the folder is empty (no messages or subfolders), it
  1332. is removed. If the folder contains no subfolders, but only messages,
  1333. then all messages are removed. The folder itself is then removed.
  1334. In both the above cases, an appropriate FolderEvent is
  1335. generated by the Store and this folder. <p>
  1336.  
  1337. If the folder contains subfolders there are 3 possible
  1338. choices an implementation is free to do: <p>
  1339.  
  1340.  <ol>
  1341.   <li> The operation fails, irrespective of whether this folder
  1342. contains messages or not. Some implementations might elect to go
  1343. with this simple approach. The delete() method returns false.
  1344.  
  1345.   <li> Any messages within the folder are removed. Subfolders
  1346. are not removed. The folder itself is not removed or affected
  1347. in any manner. The delete() method returns true. And the
  1348. exists() method on this folder will return true indicating that
  1349. this folder still exists. <br>
  1350. An appropriate FolderEvent is generated by the Store and this folder.
  1351.  
  1352.   <li> Any messages within the folder are removed. Subfolders are
  1353. not removed. The folder itself changes its type from
  1354. HOLDS_FOLDERS | HOLDS_MESSAGES to HOLDS_FOLDERS. Thus new
  1355. messages cannot be added to this folder, but new subfolders can
  1356. be created underneath. The delete() method returns true indicating
  1357. success. The exists() method on this folder will return true
  1358. indicating that this folder still exists. <br>
  1359. An appropriate FolderEvent is generated by the Store and this folder.
  1360. </ol>
  1361. </ul>
  1362. <P>
  1363. <DD><DL>
  1364.  
  1365. <DT><B>Returns:</B><DD>true if the Folder is deleted successfully
  1366. <DT><B>Throws:</B>
  1367. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1368.                        not exist
  1369. <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
  1370.                        the closed state.
  1371. <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>
  1372. </DD>
  1373. </DL>
  1374. <HR>
  1375.  
  1376. <A NAME="renameTo(javax.mail.Folder)"><!-- --></A><H3>
  1377. renameTo</H3>
  1378. <PRE>
  1379. public abstract boolean <B>renameTo</B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;f)
  1380.                          throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1381. <DL>
  1382. <DD>Rename this Folder. This method will succeed only on a closed
  1383. Folder. <p>
  1384.  
  1385. If the rename is successful, a RENAMED FolderEvent is delivered
  1386. to FolderListeners registered on this folder and its containing
  1387. Store.
  1388. <P>
  1389. <DD><DL>
  1390. <DT><B>Parameters:</B><DD><CODE>f</CODE> - a folder representing the new name for this Folder
  1391. <DT><B>Returns:</B><DD>true if the Folder is renamed successfully
  1392. <DT><B>Throws:</B>
  1393. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1394.                        not exist
  1395. <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
  1396.                        the closed state.
  1397. <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>
  1398. </DD>
  1399. </DL>
  1400. <HR>
  1401.  
  1402. <A NAME="open(int)"><!-- --></A><H3>
  1403. open</H3>
  1404. <PRE>
  1405. public abstract void <B>open</B>(int&nbsp;mode)
  1406.                   throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1407. <DL>
  1408. <DD>Open this Folder. This method is valid only on Folders that
  1409. can contain Messages and that are closed. <p>
  1410.  
  1411. If this folder is opened successfully, an OPENED ConnectionEvent
  1412. is delivered to any ConnectionListeners registered on this
  1413. Folder. <p>
  1414.  
  1415. The effect of opening multiple connections to the same folder
  1416. on a specifc Store is implementation dependent. Some implementations
  1417. allow multiple readers, but only one writer. Others allow
  1418. multiple writers as well as readers.
  1419. <P>
  1420. <DD><DL>
  1421. <DT><B>Parameters:</B><DD><CODE>mode</CODE> - open the Folder READ_ONLY or READ_WRITE
  1422. <DT><B>Throws:</B>
  1423. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1424.                        not exist.
  1425. <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
  1426.                        the closed state.
  1427. <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>,
  1428. <A HREF="../../javax/mail/Folder.html#READ_WRITE"><CODE>READ_WRITE</CODE></A>,
  1429. <A HREF="../../javax/mail/Folder.html#getType()"><CODE>getType()</CODE></A>,
  1430. <A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL>
  1431. </DD>
  1432. </DL>
  1433. <HR>
  1434.  
  1435. <A NAME="close(boolean)"><!-- --></A><H3>
  1436. close</H3>
  1437. <PRE>
  1438. public abstract void <B>close</B>(boolean&nbsp;expunge)
  1439.                    throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1440. <DL>
  1441. <DD>Close this Folder. This method is valid only on open Folders. <p>
  1442.  
  1443. A CLOSED ConnectionEvent is delivered to any ConnectionListeners
  1444. registered on this Folder. Note that the folder is closed even
  1445. if this method terminates abnormally by throwing a
  1446. MessagingException.
  1447. <P>
  1448. <DD><DL>
  1449. <DT><B>Parameters:</B><DD><CODE>expunge</CODE> - expunges all deleted messages if this flag is true
  1450. <DT><B>Throws:</B>
  1451. <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
  1452. <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>
  1453. </DD>
  1454. </DL>
  1455. <HR>
  1456.  
  1457. <A NAME="isOpen()"><!-- --></A><H3>
  1458. isOpen</H3>
  1459. <PRE>
  1460. public abstract boolean <B>isOpen</B>()</PRE>
  1461. <DL>
  1462. <DD>Indicates whether this Folder is in the 'open' state.
  1463. <P>
  1464. <DD><DL>
  1465.  
  1466. <DT><B>Returns:</B><DD>true if this Folder is in the 'open' state.</DL>
  1467. </DD>
  1468. </DL>
  1469. <HR>
  1470.  
  1471. <A NAME="getMode()"><!-- --></A><H3>
  1472. getMode</H3>
  1473. <PRE>
  1474. public int <B>getMode</B>()</PRE>
  1475. <DL>
  1476. <DD>Return the open mode of this folder.  Returns
  1477. <code>Folder.READ_ONLY</code>, <code>Folder.READ_WRITE</code>,
  1478. or -1 if the open mode is not known (usually only because an older
  1479. <code>Folder</code> provider has not been updated to use this new
  1480. method).
  1481. <P>
  1482. <DD><DL>
  1483.  
  1484. <DT><B>Returns:</B><DD>the open mode of this folder
  1485. <DT><B>Throws:</B>
  1486. <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>
  1487.  <DD>JavaMail 1.1</DD>
  1488. </DL>
  1489. </DD>
  1490. </DL>
  1491. <HR>
  1492.  
  1493. <A NAME="getPermanentFlags()"><!-- --></A><H3>
  1494. getPermanentFlags</H3>
  1495. <PRE>
  1496. public abstract <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>getPermanentFlags</B>()</PRE>
  1497. <DL>
  1498. <DD>Get the permanent flags supported by this Folder. Returns a Flags
  1499. object that contains all the flags supported. <p>
  1500.  
  1501. The special flag <code>Flags.USER </code> indicates that this Folder
  1502. supports arbitrary user-defined flags. <p>
  1503.  
  1504. The supported permanent flags for a folder may not be available
  1505. until the folder is opened.
  1506. <P>
  1507. <DD><DL>
  1508.  
  1509. <DT><B>Returns:</B><DD>permanent flags, or null if not known</DL>
  1510. </DD>
  1511. </DL>
  1512. <HR>
  1513.  
  1514. <A NAME="getMessageCount()"><!-- --></A><H3>
  1515. getMessageCount</H3>
  1516. <PRE>
  1517. public abstract int <B>getMessageCount</B>()
  1518.                             throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1519. <DL>
  1520. <DD>Get total number of messages in this Folder. <p>
  1521.  
  1522. This method can be invoked on a closed folder. However, note
  1523. that for some folder implementations, getting the total message
  1524. count can be an expensive operation involving actually opening
  1525. the folder. In such cases, a provider can choose not to support
  1526. this functionality in the closed state, in which case this method
  1527. must return -1. <p>
  1528.  
  1529. Clients invoking this method on a closed folder must be aware
  1530. that this is a potentially expensive operation. Clients must
  1531. also be prepared to handle a return value of -1 in this case.
  1532. <P>
  1533. <DD><DL>
  1534.  
  1535. <DT><B>Returns:</B><DD>total number of messages. -1 may be returned
  1536.                        by certain implementations if this method is
  1537.                        invoked on a closed folder.
  1538. <DT><B>Throws:</B>
  1539. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1540.                        not exist.
  1541. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1542. </DD>
  1543. </DL>
  1544. <HR>
  1545.  
  1546. <A NAME="getNewMessageCount()"><!-- --></A><H3>
  1547. getNewMessageCount</H3>
  1548. <PRE>
  1549. public int <B>getNewMessageCount</B>()
  1550.                       throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1551. <DL>
  1552. <DD>Get the number of new messages in this Folder. <p>
  1553.  
  1554. This method can be invoked on a closed folder. However, note
  1555. that for some folder implementations, getting the new message
  1556. count can be an expensive operation involving actually opening
  1557. the folder. In such cases, a provider can choose not to support
  1558. this functionality in the closed state, in which case this method
  1559. must return -1. <p>
  1560.  
  1561. Clients invoking this method on a closed folder must be aware
  1562. that this is a potentially expensive operation. Clients must
  1563. also be prepared to handle a return value of -1 in this case. <p>
  1564.  
  1565. This implementation returns -1 if this folder is closed. Else
  1566. this implementation gets each Message in the folder using
  1567. <code>getMessage(int)</code> and checks whether its
  1568. <code>RECENT</code> flag is set. The total number of messages
  1569. that have this flag set is returned.
  1570. <P>
  1571. <DD><DL>
  1572.  
  1573. <DT><B>Returns:</B><DD>number of new messages. -1 may be returned
  1574.                        by certain implementations if this method is
  1575.                        invoked on a closed folder.
  1576. <DT><B>Throws:</B>
  1577. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1578.                        not exist.
  1579. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1580. </DD>
  1581. </DL>
  1582. <HR>
  1583.  
  1584. <A NAME="getUnreadMessageCount()"><!-- --></A><H3>
  1585. getUnreadMessageCount</H3>
  1586. <PRE>
  1587. public int <B>getUnreadMessageCount</B>()
  1588.                          throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1589. <DL>
  1590. <DD>Get the total number of unread messages in this Folder. <p>
  1591.  
  1592. This method can be invoked on a closed folder. However, note
  1593. that for some folder implementations, getting the unread message
  1594. count can be an expensive operation involving actually opening
  1595. the folder. In such cases, a provider can choose not to support
  1596. this functionality in the closed state, in which case this method
  1597. must return -1. <p>
  1598.  
  1599. Clients invoking this method on a closed folder must be aware
  1600. that this is a potentially expensive operation. Clients must
  1601. also be prepared to handle a return value of -1 in this case. <p>
  1602.  
  1603. This implementation returns -1 if this folder is closed. Else
  1604. this implementation gets each Message in the folder using
  1605. <code>getMessage(int)</code> and checks whether its
  1606. <code>SEEN</code> flag is set. The total number of messages
  1607. that do not have this flag set is returned.
  1608. <P>
  1609. <DD><DL>
  1610.  
  1611. <DT><B>Returns:</B><DD>total number of unread messages. -1 may be returned
  1612.                        by certain implementations if this method is
  1613.                        invoked on a closed folder.
  1614. <DT><B>Throws:</B>
  1615. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1616.                        not exist.
  1617. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1618. </DD>
  1619. </DL>
  1620. <HR>
  1621.  
  1622. <A NAME="getDeletedMessageCount()"><!-- --></A><H3>
  1623. getDeletedMessageCount</H3>
  1624. <PRE>
  1625. public int <B>getDeletedMessageCount</B>()
  1626.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1627. <DL>
  1628. <DD>Get the number of deleted messages in this Folder. <p>
  1629.  
  1630. This method can be invoked on a closed folder. However, note
  1631. that for some folder implementations, getting the deleted message
  1632. count can be an expensive operation involving actually opening
  1633. the folder. In such cases, a provider can choose not to support
  1634. this functionality in the closed state, in which case this method
  1635. must return -1. <p>
  1636.  
  1637. Clients invoking this method on a closed folder must be aware
  1638. that this is a potentially expensive operation. Clients must
  1639. also be prepared to handle a return value of -1 in this case. <p>
  1640.  
  1641. This implementation returns -1 if this folder is closed. Else
  1642. this implementation gets each Message in the folder using
  1643. <code>getMessage(int)</code> and checks whether its
  1644. <code>DELETED</code> flag is set. The total number of messages
  1645. that have this flag set is returned.
  1646. <P>
  1647. <DD><DL>
  1648.  
  1649. <DT><B>Returns:</B><DD>number of deleted messages. -1 may be returned
  1650.                        by certain implementations if this method is
  1651.                        invoked on a closed folder.
  1652. <DT><B>Throws:</B>
  1653. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1654.                        not exist.
  1655. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  1656.  <DD>JavaMail 1.3</DD>
  1657. </DL>
  1658. </DD>
  1659. </DL>
  1660. <HR>
  1661.  
  1662. <A NAME="getMessage(int)"><!-- --></A><H3>
  1663. getMessage</H3>
  1664. <PRE>
  1665. public abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> <B>getMessage</B>(int&nbsp;msgnum)
  1666.                            throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1667. <DL>
  1668. <DD>Get the Message object corresponding to the given message
  1669. number.  A Message object's message number is the relative
  1670.  position of this Message in its Folder. Messages are numbered
  1671.  starting at 1 through the total number of message in the folder.
  1672.  Note that the message number for a particular Message can change
  1673.  during a session if other messages in the Folder are deleted and
  1674.  the Folder is expunged. <p>
  1675.  
  1676.  Message objects are light-weight references to the actual message
  1677.  that get filled up on demand. Hence Folder implementations are
  1678.  expected to provide light-weight Message objects. <p>
  1679.  
  1680.  Unlike Folder objects, repeated calls to getMessage with the
  1681.  same message number will return the same Message object, as
  1682.  long as no messages in this folder have been expunged. <p>
  1683.  
  1684.  Since message numbers can change within a session if the folder
  1685.  is expunged , clients are advised not to use message numbers as
  1686.  references to messages. Use Message objects instead.
  1687. <P>
  1688. <DD><DL>
  1689. <DT><B>Parameters:</B><DD><CODE>msgnum</CODE> - the message number
  1690. <DT><B>Returns:</B><DD>the Message object
  1691. <DT><B>Throws:</B>
  1692. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1693.                         not exist.
  1694. <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
  1695. <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
  1696.                         is out of range.
  1697. <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>,
  1698. <A HREF="../../javax/mail/Folder.html#fetch(javax.mail.Message[], javax.mail.FetchProfile)"><CODE>fetch(javax.mail.Message[], javax.mail.FetchProfile)</CODE></A></DL>
  1699. </DD>
  1700. </DL>
  1701. <HR>
  1702.  
  1703. <A NAME="getMessages(int, int)"><!-- --></A><H3>
  1704. getMessages</H3>
  1705. <PRE>
  1706. public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>getMessages</B>(int&nbsp;start,
  1707.                              int&nbsp;end)
  1708.                       throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1709. <DL>
  1710. <DD>Get the Message objects for message numbers ranging from start
  1711.  through end, both start and end inclusive. Note that message
  1712.  numbers start at 1, not 0. <p>
  1713.  
  1714.  Message objects are light-weight references to the actual message
  1715.  that get filled up on demand. Hence Folder implementations are
  1716.  expected to provide light-weight Message objects. <p>
  1717.  
  1718.  This implementation uses getMessage(index) to obtain the required
  1719.  Message objects. Note that the returned array must contain
  1720.  <code>(end-start+1)</code> Message objects.
  1721. <P>
  1722. <DD><DL>
  1723. <DT><B>Parameters:</B><DD><CODE>start</CODE> - the number of the first message<DD><CODE>end</CODE> - the number of the last message
  1724. <DT><B>Returns:</B><DD>the Message objects
  1725. <DT><B>Throws:</B>
  1726. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1727.                         not exist.
  1728. <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.
  1729. <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
  1730.                         message numbers are out of range.
  1731. <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>
  1732. </DD>
  1733. </DL>
  1734. <HR>
  1735.  
  1736. <A NAME="getMessages(int[])"><!-- --></A><H3>
  1737. getMessages</H3>
  1738. <PRE>
  1739. public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>getMessages</B>(int[]&nbsp;msgnums)
  1740.                       throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1741. <DL>
  1742. <DD>Get the Message objects for message numbers specified in
  1743.  the array. <p>
  1744.  
  1745.  Message objects are light-weight references to the actual message
  1746.  that get filled up on demand. Hence Folder implementations are
  1747.  expected to provide light-weight Message objects. <p>
  1748.  
  1749.  This implementation uses getMessage(index) to obtain the required
  1750.  Message objects. Note that the returned array must contain
  1751.  <code>msgnums.length</code> Message objects
  1752. <P>
  1753. <DD><DL>
  1754. <DT><B>Parameters:</B><DD><CODE>msgnums</CODE> - the array of message numbers
  1755. <DT><B>Returns:</B><DD>the array of Message objects.
  1756. <DT><B>Throws:</B>
  1757. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1758.                         not exist.
  1759. <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.
  1760. <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
  1761.                         in the given array is out of range.
  1762. <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>
  1763. </DD>
  1764. </DL>
  1765. <HR>
  1766.  
  1767. <A NAME="getMessages()"><!-- --></A><H3>
  1768. getMessages</H3>
  1769. <PRE>
  1770. public <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>getMessages</B>()
  1771.                       throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1772. <DL>
  1773. <DD>Get all Message objects from this Folder. Returns an empty array
  1774.  if the folder is empty.
  1775.  
  1776.  Clients can use Message objects (instead of sequence numbers)
  1777.  as references to the messages within a folder; this method supplies
  1778.  the Message objects to the client. Folder implementations are
  1779.  expected to provide light-weight Message objects, which get
  1780.  filled on demand. <p>
  1781.  
  1782.  This implementation invokes <code>getMessageCount()</code> to get
  1783.  the current message count and then uses <code>getMessage()</code>
  1784.  to get Message objects from 1 till the message count.
  1785. <P>
  1786. <DD><DL>
  1787.  
  1788. <DT><B>Returns:</B><DD>array of Message objects, empty array if folder
  1789.                         is empty.
  1790. <DT><B>Throws:</B>
  1791. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1792.                         not exist.
  1793. <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.
  1794. <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>
  1795. </DD>
  1796. </DL>
  1797. <HR>
  1798.  
  1799. <A NAME="appendMessages(javax.mail.Message[])"><!-- --></A><H3>
  1800. appendMessages</H3>
  1801. <PRE>
  1802. public abstract void <B>appendMessages</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs)
  1803.                              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1804. <DL>
  1805. <DD>Append given Messages to this folder. This method can be
  1806.  invoked on a closed Folder. An appropriate MessageCountEvent
  1807.  is delivered to any MessageCountListener registered on this
  1808.  folder when the messages arrive in the folder. <p>
  1809.  
  1810.  Folder implementations must not abort this operation if a
  1811.  Message in the given message array turns out to be an
  1812.  expunged Message.
  1813. <P>
  1814. <DD><DL>
  1815. <DT><B>Parameters:</B><DD><CODE>msgs</CODE> - array of Messages to be appended
  1816. <DT><B>Throws:</B>
  1817. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  1818.                         not exist.
  1819. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if the append failed.</DL>
  1820. </DD>
  1821. </DL>
  1822. <HR>
  1823.  
  1824. <A NAME="fetch(javax.mail.Message[], javax.mail.FetchProfile)"><!-- --></A><H3>
  1825. fetch</H3>
  1826. <PRE>
  1827. public void <B>fetch</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs,
  1828.                   <A HREF="../../javax/mail/FetchProfile.html" title="class in javax.mail">FetchProfile</A>&nbsp;fp)
  1829.            throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1830. <DL>
  1831. <DD>Prefetch the items specified in the FetchProfile for the
  1832.  given Messages. <p>
  1833.  
  1834.  Clients use this method to indicate that the specified items are
  1835.  needed en-masse for the given message range. Implementations are
  1836.  expected to retrieve these items for the given message range in
  1837.  a efficient manner. Note that this method is just a hint to the
  1838.  implementation to prefetch the desired items. <p>
  1839.  
  1840.  An example is a client filling its header-view window with
  1841.  the Subject, From and X-mailer headers for all messages in the
  1842.  folder.<p>
  1843.  <blockquote><pre>
  1844.  
  1845.   Message[] msgs = folder.getMessages();
  1846.  
  1847.   FetchProfile fp = new FetchProfile();
  1848.   fp.add(FetchProfile.Item.ENVELOPE);
  1849.   fp.add("X-mailer");
  1850.   folder.fetch(msgs, fp);
  1851.  
  1852.   for (int i = 0; i < folder.getMessageCount(); i++) {
  1853.       display(msg[i].getFrom());
  1854.       display(msg[i].getSubject());
  1855.       display(msg[i].getHeader("X-mailer"));
  1856.   }
  1857.  
  1858.  </pre></blockquote><p>
  1859.  
  1860.  The implementation provided here just returns without
  1861.  doing anything useful. Providers wanting to provide a real
  1862.  implementation for this method should override this method.
  1863. <P>
  1864. <DD><DL>
  1865. <DT><B>Parameters:</B><DD><CODE>msgs</CODE> - fetch items for these messages<DD><CODE>fp</CODE> - the FetchProfile
  1866. <DT><B>Throws:</B>
  1867. <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
  1868. <DD><CODE>MessagingException.</CODE>
  1869. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1870. </DD>
  1871. </DL>
  1872. <HR>
  1873.  
  1874. <A NAME="setFlags(javax.mail.Message[], javax.mail.Flags, boolean)"><!-- --></A><H3>
  1875. setFlags</H3>
  1876. <PRE>
  1877. public void <B>setFlags</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs,
  1878.                      <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  1879.                      boolean&nbsp;value)
  1880.               throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1881. <DL>
  1882. <DD>Set the specified flags on the messages specified in the array.
  1883.  This will result in appropriate MessageChangedEvents being
  1884.  delivered to any MessageChangedListener registered on this
  1885.  Message's containing folder. <p>
  1886.  
  1887. Note that the specified Message objects <strong>must</strong>
  1888. belong to this folder. Certain Folder implementations can
  1889. optimize the operation of setting Flags for a group of messages,
  1890. so clients might want to use this method, rather than invoking
  1891. <code>Message.setFlags</code> for each Message. <p>
  1892.  
  1893. This implementation degenerates to invoking <code>setFlags()</code>
  1894. on each Message object. Specific Folder implementations that can
  1895. optimize this case should do so.
  1896. Also, an implementation must not abort the operation if a Message
  1897. in the array turns out to be an expunged Message.
  1898. <P>
  1899. <DD><DL>
  1900. <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
  1901. <DT><B>Throws:</B>
  1902. <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
  1903.                        or if it has been opened READ_ONLY.
  1904. <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>,
  1905. <A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL>
  1906. </DD>
  1907. </DL>
  1908. <HR>
  1909.  
  1910. <A NAME="setFlags(int, int, javax.mail.Flags, boolean)"><!-- --></A><H3>
  1911. setFlags</H3>
  1912. <PRE>
  1913. public void <B>setFlags</B>(int&nbsp;start,
  1914.                     int&nbsp;end,
  1915.                     <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  1916.                     boolean&nbsp;value)
  1917.              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1918. <DL>
  1919. <DD>Set the specified flags on the messages numbered from start
  1920. through end, both start and end inclusive. Note that message
  1921. numbers start at 1, not 0.
  1922. This will result in appropriate MessageChangedEvents being
  1923. delivered to any MessageChangedListener registered on this
  1924. Message's containing folder. <p>
  1925.  
  1926.  Certain Folder implementations can
  1927.  optimize the operation of setting Flags for a group of messages,
  1928.  so clients might want to use this method, rather than invoking
  1929.  <code>Message.setFlags</code> for each Message. <p>
  1930.  
  1931.  The default implementation uses <code>getMessage(int)</code> to
  1932.  get each <code>Message</code> object and then invokes
  1933.  <code>setFlags</code> on that object to set the flags.
  1934.  Specific Folder implementations that can optimize this case should do so.
  1935.  Also, an implementation must not abort the operation if a message
  1936.  number refers to an expunged message.
  1937. <P>
  1938. <DD><DL>
  1939. <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
  1940. <DT><B>Throws:</B>
  1941. <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
  1942.                         or if it has been opened READ_ONLY.
  1943. <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
  1944.                         message numbers are out of range.
  1945. <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>,
  1946. <A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL>
  1947. </DD>
  1948. </DL>
  1949. <HR>
  1950.  
  1951. <A NAME="setFlags(int[], javax.mail.Flags, boolean)"><!-- --></A><H3>
  1952. setFlags</H3>
  1953. <PRE>
  1954. public void <B>setFlags</B>(int[]&nbsp;msgnums,
  1955.                      <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  1956.                      boolean&nbsp;value)
  1957.               throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1958. <DL>
  1959. <DD>Set the specified flags on the messages whose message numbers
  1960.  are in the array.
  1961.  This will result in appropriate MessageChangedEvents being
  1962.  delivered to any MessageChangedListener registered on this
  1963.  Message's containing folder. <p>
  1964.  
  1965. Certain Folder implementations can
  1966. optimize the operation of setting Flags for a group of messages,
  1967. so clients might want to use this method, rather than invoking
  1968. <code>Message.setFlags</code> for each Message. <p>
  1969.  
  1970. The default implementation uses <code>getMessage(int)</code> to
  1971. get each <code>Message</code> object and then invokes
  1972. <code>setFlags</code> on that object to set the flags.
  1973. Specific Folder implementations that can optimize this case should do so.
  1974. Also, an implementation must not abort the operation if a message
  1975. number refers to an expunged message.
  1976. <P>
  1977. <DD><DL>
  1978. <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
  1979. <DT><B>Throws:</B>
  1980. <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
  1981.                        or if it has been opened READ_ONLY.
  1982. <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
  1983.                        in the given array is out of range.
  1984. <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>,
  1985. <A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL>
  1986. </DD>
  1987. </DL>
  1988. <HR>
  1989.  
  1990. <A NAME="copyMessages(javax.mail.Message[], javax.mail.Folder)"><!-- --></A><H3>
  1991. copyMessages</H3>
  1992. <PRE>
  1993. public void <B>copyMessages</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs,
  1994.                         <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder)
  1995.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1996. <DL>
  1997. <DD>Copy the specified Messages from this Folder into another
  1998. Folder. This operation appends these Messages to the
  1999. destination Folder. The destination Folder does not have to
  2000. be opened.  An appropriate MessageCountEvent
  2001. is delivered to any MessageCountListener registered on the
  2002. destination folder when the messages arrive in the folder. <p>
  2003.  
  2004. Note that the specified Message objects <strong>must</strong>
  2005. belong to this folder. Folder implementations might be able
  2006. to optimize this method by doing server-side copies. <p>
  2007.  
  2008. This implementation just invokes <code>appendMessages()</code>
  2009. on the destination folder to append the given Messages. Specific
  2010. folder implementations that support server-side copies should
  2011. do so, if the destination folder's Store is the same as this
  2012.  folder's Store.
  2013. Also, an implementation must not abort the operation if a
  2014. Message in the array turns out to be an expunged Message.
  2015. <P>
  2016. <DD><DL>
  2017. <DT><B>Parameters:</B><DD><CODE>msgs</CODE> - the array of message objects<DD><CODE>folder</CODE> - the folder to copy the messages to
  2018. <DT><B>Throws:</B>
  2019. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if the destination
  2020.                        folder does not exist.
  2021. <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.
  2022. <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>
  2023. </DD>
  2024. </DL>
  2025. <HR>
  2026.  
  2027. <A NAME="expunge()"><!-- --></A><H3>
  2028. expunge</H3>
  2029. <PRE>
  2030. public abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[] <B>expunge</B>()
  2031.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2032. <DL>
  2033. <DD>Expunge (permanently remove) messages marked DELETED. Returns an
  2034. array containing the expunged message objects.  The
  2035. <code>getMessageNumber</code> method
  2036. on each of these message objects returns that Message's original
  2037.  (that is, prior to the expunge) sequence number. A MessageCountEvent
  2038.  containing the expunged messages is delivered to any
  2039.  MessageCountListeners registered on the folder. <p>
  2040.  
  2041.  Expunge causes the renumbering of Message objects subsequent to
  2042.  the expunged messages. Clients that use message numbers as
  2043.  references to messages should be aware of this and should be
  2044.  prepared to deal with the situation (probably by flushing out
  2045.  existing message number caches and reloading them). Because of
  2046.  this complexity, it is better for clients to use Message objects
  2047.  as references to messages, rather than message numbers. Any
  2048.  expunged Messages objects still have to be pruned, but other
  2049.  Messages in that folder are not affected by the expunge. <p>
  2050.  
  2051.  After a message is expunged, only the <code>isExpunged</code> and
  2052.  <code>getMessageNumber</code> methods are still valid on the
  2053.  corresponding Message object; other methods may throw
  2054.  <code>MessageRemovedException</code>
  2055. <P>
  2056. <DD><DL>
  2057.  
  2058. <DT><B>Returns:</B><DD>array of expunged Message objects
  2059. <DT><B>Throws:</B>
  2060. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does not
  2061.                         exist
  2062. <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.
  2063. <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>,
  2064. <A HREF="../../javax/mail/event/MessageCountEvent.html" title="class in javax.mail.event"><CODE>MessageCountEvent</CODE></A></DL>
  2065. </DD>
  2066. </DL>
  2067. <HR>
  2068.  
  2069. <A NAME="search(javax.mail.search.SearchTerm)"><!-- --></A><H3>
  2070. search</H3>
  2071. <PRE>
  2072. 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>&nbsp;term)
  2073.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2074. <DL>
  2075. <DD>Search this Folder for messages matching the specified
  2076.  search criterion. Returns an array containing the matching
  2077.  messages . Returns an empty array if no matches were found. <p>
  2078.  
  2079.  This implementation invokes
  2080.  <code>search(term, getMessages())</code>, to apply the search
  2081.  over all the messages in this folder. Providers that can implement
  2082.  server-side searching might want to override this method to provide
  2083.  a more efficient implementation.
  2084. <P>
  2085. <DD><DL>
  2086. <DT><B>Parameters:</B><DD><CODE>term</CODE> - the search criterion
  2087. <DT><B>Returns:</B><DD>array of matching messages
  2088. <DT><B>Throws:</B>
  2089. <DD><CODE><A HREF="../../javax/mail/search/SearchException.html" title="class in javax.mail.search">SearchException</A></CODE> - if the search
  2090.                         term is too complex for the implementation to handle.
  2091. <DD><CODE><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></CODE> - if this folder does
  2092.                         not exist.
  2093. <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.
  2094. <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>
  2095. </DD>
  2096. </DL>
  2097. <HR>
  2098.  
  2099. <A NAME="search(javax.mail.search.SearchTerm, javax.mail.Message[])"><!-- --></A><H3>
  2100. search</H3>
  2101. <PRE>
  2102. 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>&nbsp;term,
  2103.                         <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs)
  2104.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2105. <DL>
  2106. <DD>Search the given array of messages for those that match the
  2107.  specified search criterion. Returns an array containing the
  2108.  matching messages. Returns an empty array if no matches were
  2109.  found. <p>
  2110.  
  2111.  Note that the specified Message objects <strong>must</strong>
  2112.  belong to this folder. <p>
  2113.  
  2114.  This implementation iterates through the given array of messages,
  2115.  and applies the search criterion on each message by calling
  2116.  its <code>match()</code> method with the given term. The
  2117.  messages that succeed in the match are returned. Providers
  2118.  that can implement server-side searching might want to override
  2119.  this method to provide a more efficient implementation. If the
  2120.  search term is too complex or contains user-defined terms that
  2121.  cannot be executed on the server, providers may elect to either
  2122.  throw a SearchException or degenerate to client-side searching by
  2123.  calling <code>super.search()</code> to invoke this implementation.
  2124. <P>
  2125. <DD><DL>
  2126. <DT><B>Parameters:</B><DD><CODE>term</CODE> - the search criterion<DD><CODE>msgs</CODE> - the messages to be searched
  2127. <DT><B>Returns:</B><DD>array of matching messages
  2128. <DT><B>Throws:</B>
  2129. <DD><CODE><A HREF="../../javax/mail/search/SearchException.html" title="class in javax.mail.search">SearchException</A></CODE> - if the search
  2130.                         term is too complex for the implementation to handle.
  2131. <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
  2132. <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>
  2133. </DD>
  2134. </DL>
  2135. <HR>
  2136.  
  2137. <A NAME="addConnectionListener(javax.mail.event.ConnectionListener)"><!-- --></A><H3>
  2138. addConnectionListener</H3>
  2139. <PRE>
  2140. public void <B>addConnectionListener</B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A>&nbsp;l)</PRE>
  2141. <DL>
  2142. <DD>Add a listener for Connection events on this Folder. <p>
  2143.  
  2144.  The implementation provided here adds this listener
  2145.  to an internal list of ConnectionListeners.
  2146. <P>
  2147. <DD><DL>
  2148. <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>
  2149. </DD>
  2150. </DL>
  2151. <HR>
  2152.  
  2153. <A NAME="removeConnectionListener(javax.mail.event.ConnectionListener)"><!-- --></A><H3>
  2154. removeConnectionListener</H3>
  2155. <PRE>
  2156. public void <B>removeConnectionListener</B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A>&nbsp;l)</PRE>
  2157. <DL>
  2158. <DD>Remove a Connection event listener. <p>
  2159.  
  2160.  The implementation provided here removes this listener
  2161.  from the internal list of ConnectionListeners.
  2162. <P>
  2163. <DD><DL>
  2164. <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>
  2165. </DD>
  2166. </DL>
  2167. <HR>
  2168.  
  2169. <A NAME="notifyConnectionListeners(int)"><!-- --></A><H3>
  2170. notifyConnectionListeners</H3>
  2171. <PRE>
  2172. protected void <B>notifyConnectionListeners</B>(int&nbsp;type)</PRE>
  2173. <DL>
  2174. <DD>Notify all ConnectionListeners. Folder implementations are
  2175.  expected to use this method to broadcast connection events. <p>
  2176.  
  2177.  The provided implementation queues the event into
  2178.  an internal event queue. An event dispatcher thread dequeues
  2179.  events from the queue and dispatches them to the registered
  2180.  ConnectionListeners. Note that the event dispatching occurs
  2181.  in a separate thread, thus avoiding potential deadlock problems.
  2182. <P>
  2183. <DD><DL>
  2184. <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>
  2185. </DD>
  2186. </DL>
  2187. <HR>
  2188.  
  2189. <A NAME="addFolderListener(javax.mail.event.FolderListener)"><!-- --></A><H3>
  2190. addFolderListener</H3>
  2191. <PRE>
  2192. public void <B>addFolderListener</B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A>&nbsp;l)</PRE>
  2193. <DL>
  2194. <DD>Add a listener for Folder events on this Folder. <p>
  2195.  
  2196.  The implementation provided here adds this listener
  2197.  to an internal list of FolderListeners.
  2198. <P>
  2199. <DD><DL>
  2200. <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>
  2201. </DD>
  2202. </DL>
  2203. <HR>
  2204.  
  2205. <A NAME="removeFolderListener(javax.mail.event.FolderListener)"><!-- --></A><H3>
  2206. removeFolderListener</H3>
  2207. <PRE>
  2208. public void <B>removeFolderListener</B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A>&nbsp;l)</PRE>
  2209. <DL>
  2210. <DD>Remove a Folder event listener. <p>
  2211.  
  2212.  The implementation provided here removes this listener
  2213.  from the internal list of FolderListeners.
  2214. <P>
  2215. <DD><DL>
  2216. <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>
  2217. </DD>
  2218. </DL>
  2219. <HR>
  2220.  
  2221. <A NAME="notifyFolderListeners(int)"><!-- --></A><H3>
  2222. notifyFolderListeners</H3>
  2223. <PRE>
  2224. protected void <B>notifyFolderListeners</B>(int&nbsp;type)</PRE>
  2225. <DL>
  2226. <DD>Notify all FolderListeners registered on this Folder and
  2227.  this folder's Store. Folder implementations are expected
  2228. to use this method to broadcast Folder events. <p>
  2229.  
  2230. The implementation provided here queues the event into
  2231. an internal event queue. An event dispatcher thread dequeues
  2232. events from the queue and dispatches them to the
  2233. FolderListeners registered on this folder. The implementation
  2234. also invokes <code>notifyFolderListeners</code> on this folder's
  2235.  Store to notify any FolderListeners registered on the store.
  2236. <P>
  2237. <DD><DL>
  2238. <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>
  2239. </DD>
  2240. </DL>
  2241. <HR>
  2242.  
  2243. <A NAME="notifyFolderRenamedListeners(javax.mail.Folder)"><!-- --></A><H3>
  2244. notifyFolderRenamedListeners</H3>
  2245. <PRE>
  2246. protected void <B>notifyFolderRenamedListeners</B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder)</PRE>
  2247. <DL>
  2248. <DD>Notify all FolderListeners registered on this Folder and
  2249.  this folder's Store about the renaming of this folder.
  2250. Folder implementations are expected to use this method to
  2251. broadcast Folder events indicating the renaming of folders. <p>
  2252.  
  2253. The implementation provided here queues the event into
  2254. an internal event queue. An event dispatcher thread dequeues
  2255. events from the queue and dispatches them to the
  2256. FolderListeners registered on this folder. The implementation
  2257. also invokes <code>notifyFolderRenamedListeners</code> on this
  2258. folder's Store to notify any FolderListeners registered on the store.
  2259. <P>
  2260. <DD><DL>
  2261. <DT><B>Parameters:</B><DD><CODE>folder</CODE> - Folder representing the new name.<DT><B>Since:</B></DT>
  2262.   <DD>JavaMail 1.1</DD>
  2263. <DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#notifyFolderListeners(int)"><CODE>notifyFolderListeners(int)</CODE></A></DL>
  2264. </DD>
  2265. </DL>
  2266. <HR>
  2267.  
  2268. <A NAME="addMessageCountListener(javax.mail.event.MessageCountListener)"><!-- --></A><H3>
  2269. addMessageCountListener</H3>
  2270. <PRE>
  2271. public void <B>addMessageCountListener</B>(<A HREF="../../javax/mail/event/MessageCountListener.html" title="interface in javax.mail.event">MessageCountListener</A>&nbsp;l)</PRE>
  2272. <DL>
  2273. <DD>Add a listener for MessageCount events on this Folder. <p>
  2274.  
  2275.  The implementation provided here adds this listener
  2276.  to an internal list of MessageCountListeners.
  2277. <P>
  2278. <DD><DL>
  2279. <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>
  2280. </DD>
  2281. </DL>
  2282. <HR>
  2283.  
  2284. <A NAME="removeMessageCountListener(javax.mail.event.MessageCountListener)"><!-- --></A><H3>
  2285. removeMessageCountListener</H3>
  2286. <PRE>
  2287. public void <B>removeMessageCountListener</B>(<A HREF="../../javax/mail/event/MessageCountListener.html" title="interface in javax.mail.event">MessageCountListener</A>&nbsp;l)</PRE>
  2288. <DL>
  2289. <DD>Remove a MessageCount listener. <p>
  2290.  
  2291.  The implementation provided here removes this listener
  2292.  from the internal list of MessageCountListeners.
  2293. <P>
  2294. <DD><DL>
  2295. <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>
  2296. </DD>
  2297. </DL>
  2298. <HR>
  2299.  
  2300. <A NAME="notifyMessageAddedListeners(javax.mail.Message[])"><!-- --></A><H3>
  2301. notifyMessageAddedListeners</H3>
  2302. <PRE>
  2303. protected void <B>notifyMessageAddedListeners</B>(<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs)</PRE>
  2304. <DL>
  2305. <DD>Notify all MessageCountListeners about the addition of messages
  2306.  into this folder. Folder implementations are expected to use this
  2307.  method to broadcast MessageCount events for indicating arrival of
  2308.  new messages. <p>
  2309.  
  2310.  The provided implementation queues the event into
  2311.  an internal event queue. An event dispatcher thread dequeues
  2312.  events from the queue and dispatches them to the registered
  2313.  MessageCountListeners. Note that the event dispatching occurs
  2314.  in a separate thread, thus avoiding potential deadlock problems.
  2315. <P>
  2316. <DD><DL>
  2317. </DL>
  2318. </DD>
  2319. </DL>
  2320. <HR>
  2321.  
  2322. <A NAME="notifyMessageRemovedListeners(boolean, javax.mail.Message[])"><!-- --></A><H3>
  2323. notifyMessageRemovedListeners</H3>
  2324. <PRE>
  2325. protected void <B>notifyMessageRemovedListeners</B>(boolean&nbsp;removed,
  2326.                                              <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>[]&nbsp;msgs)</PRE>
  2327. <DL>
  2328. <DD>Notify all MessageCountListeners about the removal of messages
  2329.  from this Folder. Folder implementations are expected to use this
  2330.  method to broadcast MessageCount events indicating removal of
  2331.  messages. <p>
  2332.  
  2333.  The provided implementation queues the event into
  2334.  an internal event queue. An event dispatcher thread dequeues
  2335.  events from the queue and dispatches them to the registered
  2336.  MessageCountListeners. Note that the event dispatching occurs
  2337.  in a separate thread, thus avoiding potential deadlock problems.
  2338. <P>
  2339. <DD><DL>
  2340. </DL>
  2341. </DD>
  2342. </DL>
  2343. <HR>
  2344.  
  2345. <A NAME="addMessageChangedListener(javax.mail.event.MessageChangedListener)"><!-- --></A><H3>
  2346. addMessageChangedListener</H3>
  2347. <PRE>
  2348. public void <B>addMessageChangedListener</B>(<A HREF="../../javax/mail/event/MessageChangedListener.html" title="interface in javax.mail.event">MessageChangedListener</A>&nbsp;l)</PRE>
  2349. <DL>
  2350. <DD>Add a listener for MessageChanged events on this Folder. <p>
  2351.  
  2352.  The implementation provided here adds this listener
  2353.  to an internal list of MessageChangedListeners.
  2354. <P>
  2355. <DD><DL>
  2356. <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>
  2357. </DD>
  2358. </DL>
  2359. <HR>
  2360.  
  2361. <A NAME="removeMessageChangedListener(javax.mail.event.MessageChangedListener)"><!-- --></A><H3>
  2362. removeMessageChangedListener</H3>
  2363. <PRE>
  2364. public void <B>removeMessageChangedListener</B>(<A HREF="../../javax/mail/event/MessageChangedListener.html" title="interface in javax.mail.event">MessageChangedListener</A>&nbsp;l)</PRE>
  2365. <DL>
  2366. <DD>Remove a MessageChanged listener. <p>
  2367.  
  2368.  The implementation provided here removes this listener
  2369.  from the internal list of MessageChangedListeners.
  2370. <P>
  2371. <DD><DL>
  2372. <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>
  2373. </DD>
  2374. </DL>
  2375. <HR>
  2376.  
  2377. <A NAME="notifyMessageChangedListeners(int, javax.mail.Message)"><!-- --></A><H3>
  2378. notifyMessageChangedListeners</H3>
  2379. <PRE>
  2380. protected void <B>notifyMessageChangedListeners</B>(int&nbsp;type,
  2381.                                              <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A>&nbsp;msg)</PRE>
  2382. <DL>
  2383. <DD>Notify all MessageChangedListeners. Folder implementations are
  2384.  expected to use this method to broadcast MessageChanged events. <p>
  2385.  
  2386.  The provided implementation queues the event into
  2387.  an internal event queue. An event dispatcher thread dequeues
  2388.  events from the queue and dispatches them to registered
  2389.  MessageChangedListeners. Note that the event dispatching occurs
  2390.  in a separate thread, thus avoiding potential deadlock problems.
  2391. <P>
  2392. <DD><DL>
  2393. </DL>
  2394. </DD>
  2395. </DL>
  2396. <HR>
  2397.  
  2398. <A NAME="finalize()"><!-- --></A><H3>
  2399. finalize</H3>
  2400. <PRE>
  2401. protected void <B>finalize</B>()
  2402.                  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>
  2403. <DL>
  2404. <DD><DL>
  2405. <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>
  2406. </DD>
  2407. <DD><DL>
  2408.  
  2409. <DT><B>Throws:</B>
  2410. <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>
  2411. </DD>
  2412. </DL>
  2413. <HR>
  2414.  
  2415. <A NAME="toString()"><!-- --></A><H3>
  2416. toString</H3>
  2417. <PRE>
  2418. 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>
  2419. <DL>
  2420. <DD>override the default toString(), it will return the String
  2421.  from Folder.getFullName() or if that is null, it will use
  2422.  the default toString() behavior.
  2423. <P>
  2424. <DD><DL>
  2425. <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>
  2426. </DD>
  2427. <DD><DL>
  2428. </DL>
  2429. </DD>
  2430. </DL>
  2431. <!-- ========= END OF CLASS DATA ========= -->
  2432. <HR>
  2433.  
  2434.  
  2435. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  2436. <A NAME="navbar_bottom"><!-- --></A>
  2437. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  2438. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  2439. <TR>
  2440. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  2441. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  2442. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  2443.   <TR ALIGN="center" VALIGN="top">
  2444.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  2445.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  2446.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  2447.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Folder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  2448.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  2449.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  2450.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  2451.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  2452.   </TR>
  2453. </TABLE>
  2454. </TD>
  2455. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  2456. </EM>
  2457. </TD>
  2458. </TR>
  2459.  
  2460. <TR>
  2461. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  2462. &nbsp;<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  2463. &nbsp;<A HREF="../../javax/mail/FolderClosedException.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  2464. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  2465.   <A HREF="../../index.html?javax/mail/Folder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  2466. &nbsp;<A HREF="Folder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  2467. &nbsp;<SCRIPT type="text/javascript">
  2468.   <!--
  2469.   if(window==top) {
  2470.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  2471.   }
  2472.   //-->
  2473. </SCRIPT>
  2474. <NOSCRIPT>
  2475.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  2476. </NOSCRIPT>
  2477.  
  2478.  
  2479. </FONT></TD>
  2480. </TR>
  2481. <TR>
  2482. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  2483.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  2484. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  2485. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  2486. </TR>
  2487. </TABLE>
  2488. <A NAME="skip-navbar_bottom"></A>
  2489. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  2490.  
  2491. <HR>
  2492. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  2493. </BODY>
  2494. </HTML>
  2495.