mimemultipart.html

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

HTML
956
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a BodyPart at position <code>index</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#createInternetHeaders(java.io.InputStream)">createInternetHeaders</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create and return an InternetHeaders object that loads the headers from the given InputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/mail/internet/MimeBodyPart.html" title="class in javax.mail.internet">MimeBodyPart</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#createMimeBodyPart(java.io.InputStream)">createMimeBodyPart</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create and return a MimeBodyPart object to represent a body part parsed from the InputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/mail/internet/MimeBodyPart.html" title="class in javax.mail.internet">MimeBodyPart</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#createMimeBodyPart(javax.mail.internet.InternetHeaders, byte[])">createMimeBodyPart</A></B>(<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A>&nbsp;headers,                   byte[]&nbsp;content)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create and return a MimeBodyPart object to represent a body part parsed from the InputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#getBodyPart(int)">getBodyPart</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the specified BodyPart.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#getBodyPart(java.lang.String)">getBodyPart</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;CID)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the MimeBodyPart referred to by the given ContentID (CID).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#getCount()">getCount</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number of enclosed BodyPart objects.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#getPreamble()">getPreamble</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the preamble text, if any, that appears before the first body part of this multipart.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#isComplete()">isComplete</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the final boundary line for this multipart was seen.</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/MimeMultipart.html#parse()">parse</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the InputStream from our DataSource, constructing the appropriate MimeBodyParts.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#removeBodyPart(javax.mail.BodyPart)">removeBodyPart</A></B>(<A HREF="../../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the specified part from the multipart message.</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/MimeMultipart.html#removeBodyPart(int)">removeBodyPart</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the part at specified location (starting from 0).</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/MimeMultipart.html#setPreamble(java.lang.String)">setPreamble</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;preamble)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the preamble text to be included before the first body part.</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/MimeMultipart.html#setSubType(java.lang.String)">setSubType</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;subtype)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the 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/MimeMultipart.html#updateHeaders()">updateHeaders</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update headers.</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/MimeMultipart.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;Iterates through all the parts and outputs each MIME part separated by a boundary.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.mail.Multipart"><!-- --></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/Multipart.html" title="class in javax.mail">Multipart</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/mail/Multipart.html#getContentType()">getContentType</A>, <A HREF="../../../javax/mail/Multipart.html#getParent()">getParent</A>, <A HREF="../../../javax/mail/Multipart.html#setMultipartDataSource(javax.mail.MultipartDataSource)">setMultipartDataSource</A>, <A HREF="../../../javax/mail/Multipart.html#setParent(javax.mail.Part)">setParent</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="ds"><!-- --></A><H3>ds</H3><PRE>protected <A HREF="../../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A> <B>ds</B></PRE><DL><DD>The DataSource supplying our InputStream.<P><DL></DL></DL><HR><A NAME="parsed"><!-- --></A><H3>parsed</H3><PRE>protected boolean <B>parsed</B></PRE><DL><DD>Have we parsed the data from our InputStream yet? Defaults to true; set to false when our constructor is given a DataSource with an InputStream that we need to parse.<P><DL></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="MimeMultipart()"><!-- --></A><H3>MimeMultipart</H3><PRE>public <B>MimeMultipart</B>()</PRE><DL><DD>Default constructor. An empty MimeMultipart object is created. Its content type is set to "multipart/mixed". A unique boundary string is generated and this string is setup as the "boundary" parameter for the  <code>contentType</code> field. <p> MimeBodyParts may be added later.<P></DL><HR><A NAME="MimeMultipart(java.lang.String)"><!-- --></A><H3>MimeMultipart</H3><PRE>public <B>MimeMultipart</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;subtype)</PRE><DL><DD>Construct a MimeMultipart object of the given subtype. A unique boundary string is generated and this string is setup as the "boundary" parameter for the  <code>contentType</code> field. <p> MimeBodyParts may be added later.<P></DL><HR><A NAME="MimeMultipart(javax.activation.DataSource)"><!-- --></A><H3>MimeMultipart</H3><PRE>public <B>MimeMultipart</B>(<A HREF="../../../javax/activation/DataSource.html" title="interface in javax.activation">DataSource</A>&nbsp;ds)              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Constructs a MimeMultipart object and its bodyparts from the  given DataSource. <p>

⌨️ 快捷键说明

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