📄 message.html
字号:
the given <code>Flags</code> object are unaffected. <p> This will result in a <code>MessageChangedEvent</code> being delivered to any MessageChangedListener registered on this Message's containing folder.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>flag</CODE> - Flags object containing the flags to be set<DD><CODE>set</CODE> - the value to be set<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying implementation does not support modification of existing values.<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 message is obtained from a READ_ONLY folder.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL></DD></DL><HR><A NAME="setFlag(javax.mail.Flags.Flag, boolean)"><!-- --></A><H3>setFlag</H3><PRE>public void <B>setFlag</B>(<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A> flag, boolean set) throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Set the specified flag on this message to the specified value. This will result in a <code>MessageChangedEvent</code> being delivered to any MessageChangedListener registered on this Message's containing folder. <p> The default implementation uses the <code>setFlags</code> method.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>flag</CODE> - Flags.Flag object containing the flag to be set<DD><CODE>set</CODE> - the value to be set<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying implementation does not support modification of existing values.<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 message is obtained from a READ_ONLY folder.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL></DD></DL><HR><A NAME="getMessageNumber()"><!-- --></A><H3>getMessageNumber</H3><PRE>public int <B>getMessageNumber</B>()</PRE><DL><DD>Get the Message number for this Message. A Message object's message number is the relative position of this Message in its Folder. Note that the message number for a particular Message can change during a session if other messages in the Folder are deleted and expunged. <p> Valid message numbers start at 1. Messages that do not belong to any folder (like newly composed or derived messages) have 0 as their message number.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the message number</DL></DD></DL><HR><A NAME="setMessageNumber(int)"><!-- --></A><H3>setMessageNumber</H3><PRE>protected void <B>setMessageNumber</B>(int msgnum)</PRE><DL><DD>Set the Message number for this Message. This method is invoked only by the implementation classes.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getFolder()"><!-- --></A><H3>getFolder</H3><PRE>public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getFolder</B>()</PRE><DL><DD>Get the folder from which this message was obtained. If this is a new message or nested message, this method returns null.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the containing folder</DL></DD></DL><HR><A NAME="isExpunged()"><!-- --></A><H3>isExpunged</H3><PRE>public boolean <B>isExpunged</B>()</PRE><DL><DD>Checks whether this message is expunged. All other methods except <code>getMessageNumber()</code> are invalid on an expunged Message object. <p> Messages that are expunged due to an explict <code>expunge()</code> request on the containing Folder are removed from the Folder immediately. Messages that are externally expunged by another source are marked "expunged" and return true for the isExpunged() method, but they are not removed from the Folder until an explicit <code>expunge()</code> is done on the Folder. <p> See the description of <code>expunge()</code> for more details on expunge handling.<P><DD><DL></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#expunge()"><CODE>Folder.expunge()</CODE></A></DL></DD></DL><HR><A NAME="setExpunged(boolean)"><!-- --></A><H3>setExpunged</H3><PRE>protected void <B>setExpunged</B>(boolean expunged)</PRE><DL><DD>Sets the expunged flag for this Message. This method is to be used only by the implementation classes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>expunged</CODE> - the expunged flag</DL></DD></DL><HR><A NAME="reply(boolean)"><!-- --></A><H3>reply</H3><PRE>public abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> <B>reply</B>(boolean replyToAll) throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Get a new Message suitable for a reply to this message. The new Message will have its attributes and headers set up appropriately. Note that this new message object will be empty, that is, it will <strong>not</strong> have a "content". These will have to be suitably filled in by the client. <p> If <code>replyToAll</code> is set, the new Message will be addressed to all recipients of this message. Otherwise, the reply will be addressed to only the sender of this message (using the value of the <code>getReplyTo</code> method). <p> The "Subject" field is filled in with the original subject prefixed with "Re:" (unless it already starts with "Re:"). <p> The reply message will use the same session as this message.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>replyToAll</CODE> - reply should be sent to all recipients of this message<DT><B>Returns:</B><DD>the reply Message<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL></DD></DL><HR><A NAME="saveChanges()"><!-- --></A><H3>saveChanges</H3><PRE>public abstract void <B>saveChanges</B>() throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Save any changes made to this message into the message-store when the containing folder is closed, if the message is contained in a folder. (Some implementations may save the changes immediately.) Update any header fields to be consistent with the changed message contents. If any part of a message's headers or contents are changed, saveChanges must be called to ensure that those changes are permanent. If saveChanges is not called, any such modifications may or may not be saved, depending on the message store and folder implementation. <p> Messages obtained from folders opened READ_ONLY should not be modified and saveChanges should not be called on such messages.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><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 message is obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying implementation does not support modification of existing values.</DL></DD></DL><HR><A NAME="match(javax.mail.search.SearchTerm)"><!-- --></A><H3>match</H3><PRE>public boolean <B>match</B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A> term) throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Apply the specified Search criterion to this message.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>term</CODE> - the Search criterion<DT><B>Returns:</B><DD>true if the Message matches this search criterion, false otherwise.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search"><CODE>SearchTerm</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/mail/Header.html" titl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -