📄 store.html
字号:
<TD><CODE><B><A HREF="../../javax/mail/Store.html#getUserNamespaces(java.lang.String)">getUserNamespaces</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> user)</CODE><BR> Return a set of folders representing the namespaces for <code>user</code>. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Store.html#notifyFolderListeners(int, javax.mail.Folder)">notifyFolderListeners</A></B>(int type, <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder)</CODE><BR> Notify all FolderListeners. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Store.html#notifyFolderRenamedListeners(javax.mail.Folder, javax.mail.Folder)">notifyFolderRenamedListeners</A></B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> oldF, <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> newF)</CODE><BR> Notify all FolderListeners about the renaming of a folder. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Store.html#notifyStoreListeners(int, java.lang.String)">notifyStoreListeners</A></B>(int type, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> message)</CODE><BR> Notify all StoreListeners. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Store.html#removeFolderListener(javax.mail.event.FolderListener)">removeFolderListener</A></B>(<A HREF="../../javax/mail/event/FolderListener.html" title="interface in javax.mail.event">FolderListener</A> l)</CODE><BR> Remove a listener for Folder events. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/mail/Store.html#removeStoreListener(javax.mail.event.StoreListener)">removeStoreListener</A></B>(<A HREF="../../javax/mail/event/StoreListener.html" title="interface in javax.mail.event">StoreListener</A> l)</CODE><BR> Remove a listener for Store events. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.mail.Service"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.mail.<A HREF="../../javax/mail/Service.html" title="class in javax.mail">Service</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/mail/Service.html#addConnectionListener(javax.mail.event.ConnectionListener)">addConnectionListener</A>, <A HREF="../../javax/mail/Service.html#close()">close</A>, <A HREF="../../javax/mail/Service.html#connect()">connect</A>, <A HREF="../../javax/mail/Service.html#connect(java.lang.String, int, java.lang.String, java.lang.String)">connect</A>, <A HREF="../../javax/mail/Service.html#connect(java.lang.String, java.lang.String, java.lang.String)">connect</A>, <A HREF="../../javax/mail/Service.html#finalize()">finalize</A>, <A HREF="../../javax/mail/Service.html#getURLName()">getURLName</A>, <A HREF="../../javax/mail/Service.html#isConnected()">isConnected</A>, <A HREF="../../javax/mail/Service.html#notifyConnectionListeners(int)">notifyConnectionListeners</A>, <A HREF="../../javax/mail/Service.html#protocolConnect(java.lang.String, int, java.lang.String, java.lang.String)">protocolConnect</A>, <A HREF="../../javax/mail/Service.html#queueEvent(javax.mail.event.MailEvent, java.util.Vector)">queueEvent</A>, <A HREF="../../javax/mail/Service.html#removeConnectionListener(javax.mail.event.ConnectionListener)">removeConnectionListener</A>, <A HREF="../../javax/mail/Service.html#setConnected(boolean)">setConnected</A>, <A HREF="../../javax/mail/Service.html#setURLName(javax.mail.URLName)">setURLName</A>, <A HREF="../../javax/mail/Service.html#toString()">toString</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Store(javax.mail.Session, javax.mail.URLName)"><!-- --></A><H3>Store</H3><PRE>protected <B>Store</B>(<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A> session, <A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A> urlname)</PRE><DL><DD>Constructor.<P><DT><B>Parameters:</B><DD><CODE>session</CODE> - Session object for this Store.<DD><CODE>urlname</CODE> - URLName object to be used for this Store</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getDefaultFolder()"><!-- --></A><H3>getDefaultFolder</H3><PRE>public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getDefaultFolder</B>() throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Returns a Folder object that represents the 'root' of the default namespace presented to the user by the Store.<P><DD><DL><DT><B>Returns:</B><DD>the root Folder<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Store is not connected.<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="getFolder(java.lang.String)"><!-- --></A><H3>getFolder</H3><PRE>public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getFolder</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name) throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Return the Folder object corresponding to the given name. Note that a Folder object is returned even if the named folder does not physically exist on the Store. The <code>exists()</code> method on the folder object indicates whether this folder really exists. <p> Folder objects are not cached by the Store, so invoking this method on the same name multiple times will return that many distinct Folder objects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the Folder. In some Stores, name can be an absolute path if it starts with the hierarchy delimiter. Else it is interpreted relative to the 'root' of this namespace.<DT><B>Returns:</B><DD>Folder object<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Store is not connected.<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#exists()"><CODE>Folder.exists()</CODE></A>, <A HREF="../../javax/mail/Folder.html#create(int)"><CODE>Folder.create(int)</CODE></A></DL></DD></DL><HR><A NAME="getFolder(javax.mail.URLName)"><!-- --></A><H3>getFolder</H3><PRE>public abstract <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getFolder</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A> url) throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Return a closed Folder object, corresponding to the given URLName. The store specified in the given URLName should refer to this Store object. <p> Implementations of this method may obtain the name of the actual folder using the <code>getFile()</code> method on URLName, and use that name to create the folder.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - URLName that denotes a folder<DT><B>Returns:</B><DD>Folder object<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Store is not connected.<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/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL></DD></DL><HR><A NAME="getPersonalNamespaces()"><!-- --></A><H3>getPersonalNamespaces</H3><PRE>public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>getPersonalNamespaces</B>() throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Return a set of folders representing the <i>personal</i> namespaces for the current user. A personal namespace is a set of names that is considered within the personal scope of the authenticated user. Typically, only the authenticated user has access to mail folders in their personal namespace. If an INBOX exists for a user, it must appear within the user's personal namespace. In the typical case, there should be only one personal namespace for each user in each Store. <p> This implementation returns an array with a single entry containing the return value of the <code>getDefaultFolder</code> method. Subclasses should override this method to return appropriate information.<P><DD><DL><DT><B>Returns:</B><DD>array of Folder objects<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Store is not connected.<DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT> <DD>JavaMail 1.2</DD></DL></DD></DL><HR><A NAME="getUserNamespaces(java.lang.String)"><!-- --></A><H3>getUserNamespaces</H3><PRE>public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>[] <B>getUserNamespaces</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> user) throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Return a set of folders representing the namespaces for <code>user</code>. The namespaces returned represent the personal namespaces for the user. To access mail folders in the other user's namespace, the currently authenticated user must be explicitly granted access rights. For example, it is common for a manager to grant to their secretary access rights to their mail folders. <p> This implementation returns an empty array. Subclasses should override this method to return appropriate information.<P><DD><DL><DT><B>Returns:</B><DD>array of Folder objects<DT><B>Throws:</B>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -