mimemessage.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,132 行 · 第 1/5 页

HTML
1,132
字号
 part's content, with a MIME type of "text/plain".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#setText(java.lang.String, java.lang.String)">setText</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;text,        <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;charset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this part's content, with a MIME type of "text/plain" and the specified charset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#setText(java.lang.String, java.lang.String, java.lang.String)">setText</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;text,        <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;charset,        <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;subtype)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this part's content, with a primary MIME type of "text" and the specified MIME subtype.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#updateHeaders()">updateHeaders</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the <code>saveChanges</code> method to actually update the MIME headers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#updateMessageID()">updateMessageID</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update the Message-ID header.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#writeTo(java.io.OutputStream)">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;os)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output the message as an RFC 822 format stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#writeTo(java.io.OutputStream, java.lang.String[])">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;os,        <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;ignoreList)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output the message as an RFC 822 format stream, without specified headers.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.mail.Message"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class javax.mail.<A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/mail/Message.html#addRecipient(javax.mail.Message.RecipientType, javax.mail.Address)">addRecipient</A>, <A HREF="../../../javax/mail/Message.html#getFolder()">getFolder</A>, <A HREF="../../../javax/mail/Message.html#getMessageNumber()">getMessageNumber</A>, <A HREF="../../../javax/mail/Message.html#isExpunged()">isExpunged</A>, <A HREF="../../../javax/mail/Message.html#match(javax.mail.search.SearchTerm)">match</A>, <A HREF="../../../javax/mail/Message.html#setExpunged(boolean)">setExpunged</A>, <A HREF="../../../javax/mail/Message.html#setFlag(javax.mail.Flags.Flag, boolean)">setFlag</A>, <A HREF="../../../javax/mail/Message.html#setMessageNumber(int)">setMessageNumber</A>, <A HREF="../../../javax/mail/Message.html#setRecipient(javax.mail.Message.RecipientType, javax.mail.Address)">setRecipient</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/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.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/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.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="dh"><!-- --></A><H3>dh</H3><PRE>protected <A HREF="../../../javax/activation/DataHandler.html" title="class in javax.activation">DataHandler</A> <B>dh</B></PRE><DL><DD>The DataHandler object representing this Message's content.<P><DL></DL></DL><HR><A NAME="content"><!-- --></A><H3>content</H3><PRE>protected byte[] <B>content</B></PRE><DL><DD>Byte array that holds the bytes of this Message's content.<P><DL></DL></DL><HR><A NAME="contentStream"><!-- --></A><H3>contentStream</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> <B>contentStream</B></PRE><DL><DD>If the data for this message was supplied by an InputStream that implements the SharedInputStream interface, <code>contentStream</code> is another such stream representing the content of this message.  In this case, <code>content</code> will be null.<P><DL><DT><B>Since:</B></DT>  <DD>JavaMail 1.2</DD></DL></DL><HR><A NAME="headers"><!-- --></A><H3>headers</H3><PRE>protected <A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A> <B>headers</B></PRE><DL><DD>The InternetHeaders object that stores the header of this message.<P><DL></DL></DL><HR><A NAME="flags"><!-- --></A><H3>flags</H3><PRE>protected <A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>flags</B></PRE><DL><DD>The Flags for this message.<P><DL></DL></DL><HR><A NAME="modified"><!-- --></A><H3>modified</H3><PRE>protected boolean <B>modified</B></PRE><DL><DD>A flag indicating whether the message has been modified. If the message has not been modified, any data in the <code>content</code> array is assumed to be valid and is used directly in the <code>writeTo</code> method.  This flag is set to true when an empty message is created or when the <code>saveChanges</code> method is called.<P><DL><DT><B>Since:</B></DT>  <DD>JavaMail 1.2</DD></DL></DL><HR><A NAME="saved"><!-- --></A><H3>saved</H3><PRE>protected boolean <B>saved</B></PRE><DL><DD>Does the <code>saveChanges</code> method need to be called on this message?  This flag is set to false by the public constructor and set to true by the <code>saveChanges</code> method.  The <code>writeTo</code> method checks this flag and calls the <code>saveChanges</code> method as necessary.  This avoids the common mistake of forgetting to call the <code>saveChanges</code> method on a newly constructed message.<P><DL><DT><B>Since:</B></DT>  <DD>JavaMail 1.2</DD></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="MimeMessage(javax.mail.Session)"><!-- --></A><H3>MimeMessage</H3><PRE>public <B>MimeMessage</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A>&nbsp;session)</PRE><DL><DD>Default constructor. An empty message object is created. The <code>headers</code> field is set to an empty InternetHeaders object. The <code>flags</code> field is set to an empty Flags object. The <code>modified</code> flag is set to true.<P></DL><HR><A NAME="MimeMessage(javax.mail.Session, java.io.InputStream)"><!-- --></A><H3>MimeMessage</H3><PRE>publi

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?