📄 message.html
字号:
</DD>
</DL>
<HR>
<A NAME="getFlags()"><!-- --></A><H3>
getFlags</H3>
<PRE>
public abstract <A HREF="../../javax/mail/Flags.html">Flags</A> <B>getFlags</B>()
throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns a <code>Flags</code> object containing the flags for
this message. <p>
Modifying any of the flags in this returned Flags object will
not affect the flags of this message. Use <code>setFlags()</code>
to do that. <p><DD><DL>
<DT><B>Returns:</B><DD>Flags object containing the flags for this message<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - <DT><B>See Also: </B><DD><A HREF="../../javax/mail/Flags.html"><CODE>Flags</CODE></A>,
<A HREF="../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)"><CODE>setFlags(javax.mail.Flags, boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isSet(javax.mail.Flags.Flag)"><!-- --></A><H3>
isSet</H3>
<PRE>
public boolean <B>isSet</B>(<A HREF="../../javax/mail/Flags.Flag.html">Flags.Flag</A> flag)
throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Check whether the flag specified in the <code>flag</code>
argument is set in this message. <p>
The default implementation uses <code>getFlags</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>flag</CODE> - the flag<DT><B>Returns:</B><DD>value of the specified flag for this message<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - <DT><B>See Also: </B><DD><A HREF="../../javax/mail/Flags.Flag.html"><CODE>Flags.Flag</CODE></A>,
<A HREF="../../javax/mail/Flags.Flag.html#ANSWERED"><CODE>Flags.Flag.ANSWERED</CODE></A>,
<A HREF="../../javax/mail/Flags.Flag.html#DELETED"><CODE>Flags.Flag.DELETED</CODE></A>,
<A HREF="../../javax/mail/Flags.Flag.html#DRAFT"><CODE>Flags.Flag.DRAFT</CODE></A>,
<A HREF="../../javax/mail/Flags.Flag.html#FLAGGED"><CODE>Flags.Flag.FLAGGED</CODE></A>,
<A HREF="../../javax/mail/Flags.Flag.html#RECENT"><CODE>Flags.Flag.RECENT</CODE></A>,
<A HREF="../../javax/mail/Flags.Flag.html#SEEN"><CODE>Flags.Flag.SEEN</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setFlags(javax.mail.Flags, boolean)"><!-- --></A><H3>
setFlags</H3>
<PRE>
public abstract void <B>setFlags</B>(<A HREF="../../javax/mail/Flags.html">Flags</A> flag,
boolean set)
throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the specified flags on this message to the specified value.
Note that any flags in this message that are not specified in
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.<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><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - <DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying
implementation does not support modification
of existing values.<DD>IllegalStateException - if this message is
obtained from a READ_ONLY folder.<DT><B>See Also: </B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html"><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">Flags.Flag</A> flag,
boolean set)
throws <A HREF="../../javax/mail/MessagingException.html">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.<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><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - <DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying
implementation does not support modification
of existing values.<DD>IllegalStateException - if this message is
obtained from a READ_ONLY folder.<DT><B>See Also: </B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html"><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.<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.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFolder()"><!-- --></A><H3>
getFolder</H3>
<PRE>
public <A HREF="../../javax/mail/Folder.html">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.<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.<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.<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">Message</A> <B>reply</B>(boolean replyToAll)
throws <A HREF="../../javax/mail/MessagingException.html">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.<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><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - </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">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.<DD><DL>
<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - <DD>IllegalStateException - if this message is
obtained from a READ_ONLY folder.<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - 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">SearchTerm</A> term)
throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Apply the specified Search criterion to this message.<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><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - <DT><B>See Also: </B><DD><A HREF="../../javax/mail/search/SearchTerm.html"><CODE>SearchTerm</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="class-use/Message.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../javax/mail/Header.html"><B>PREV CLASS</B></A>
<A HREF="../../javax/mail/Message.RecipientType.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="Message.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
SUMMARY: <A HREF="#inner_class_summary">INNER</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -