⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multipart.html

📁 SUN的JAVA MAIL API
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</TABLE>

<A NAME="parts"><!-- --></A><H3>
parts</H3>
<PRE>
protected java.util.Vector <B>parts</B></PRE>
<DL>
<DD>Vector of BodyPart objects.</DL>
<HR>

<A NAME="contentType"><!-- --></A><H3>
contentType</H3>
<PRE>
protected java.lang.String <B>contentType</B></PRE>
<DL>
<DD>This field specifies the content-type of this multipart
 object. It defaults to "multipart/mixed".</DL>
<HR>

<A NAME="parent"><!-- --></A><H3>
parent</H3>
<PRE>
protected <A HREF="../../javax/mail/Part.html">Part</A> <B>parent</B></PRE>
<DL>
<DD>The <code>Part</code> containing this <code>Multipart</code>,
 if known.<DD><DL>
<DT><B>Since: </B><DD>JavaMail 1.1</DD>
</DL>
</DD>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Multipart()"><!-- --></A><H3>
Multipart</H3>
<PRE>
protected <B>Multipart</B>()</PRE>
<DL>
<DD>Default constructor. An empty Multipart object is created.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="setMultipartDataSource(javax.mail.MultipartDataSource)"><!-- --></A><H3>
setMultipartDataSource</H3>
<PRE>
protected void <B>setMultipartDataSource</B>(<A HREF="../../javax/mail/MultipartDataSource.html">MultipartDataSource</A>&nbsp;mp)
                               throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Setup this Multipart object from the given MultipartDataSource. <p>

 The method adds the MultipartDataSource's BodyPart 
 objects into this Multipart. This Multipart's contentType is
 set to that of the MultipartDataSource. <p>

 This method is typically used in those cases where one 
 has a multipart data source that has already been pre-parsed into
 the individual body parts (for example, an IMAP datasource), but 
 needs to create an appropriate Multipart subclass that represents
 a specific multipart subtype.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mp</CODE> - Multipart datasource</DL>
</DD>
</DL>
<HR>

<A NAME="getContentType()"><!-- --></A><H3>
getContentType</H3>
<PRE>
public java.lang.String <B>getContentType</B>()</PRE>
<DL>
<DD>Return the content-type of this Multipart. <p>

 This implementation just returns the value of the
 <code>contentType</code> field.<DD><DL>
<DT><B>Returns:</B><DD>content-type<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Multipart.html#contentType"><CODE>contentType</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCount()"><!-- --></A><H3>
getCount</H3>
<PRE>
public int <B>getCount</B>()
             throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return the number of enclosed BodyPart objects. <p><DD><DL>
<DT><B>Returns:</B><DD>number of parts<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Multipart.html#parts"><CODE>parts</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getBodyPart(int)"><!-- --></A><H3>
getBodyPart</H3>
<PRE>
public <A HREF="../../javax/mail/BodyPart.html">BodyPart</A> <B>getBodyPart</B>(int&nbsp;index)
                     throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the specified Part.  Parts are numbered starting at 0.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired Part<DT><B>Returns:</B><DD>the Part<DT><B>Throws:</B><DD>IndexOutOfBoundsException - if the given index
			is out of range.<DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="removeBodyPart(javax.mail.BodyPart)"><!-- --></A><H3>
removeBodyPart</H3>
<PRE>
public boolean <B>removeBodyPart</B>(<A HREF="../../javax/mail/BodyPart.html">BodyPart</A>&nbsp;part)
                       throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Remove the specified part from the multipart message.
 Shifts all the parts after the removed part down one.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>part</CODE> - The part to remove<DT><B>Returns:</B><DD>true if part removed, false otherwise<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - if no such Part exists<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="removeBodyPart(int)"><!-- --></A><H3>
removeBodyPart</H3>
<PRE>
public void <B>removeBodyPart</B>(int&nbsp;index)
                    throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Remove the part at specified location (starting from 0).
 Shifts all the parts after the removed part down one.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - Index of the part to remove<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD>IndexOutOfBoundsException - if the given index
			is out of range.<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="addBodyPart(javax.mail.BodyPart)"><!-- --></A><H3>
addBodyPart</H3>
<PRE>
public void <B>addBodyPart</B>(<A HREF="../../javax/mail/BodyPart.html">BodyPart</A>&nbsp;part)
                 throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Adds a Part to the multipart.  The BodyPart is appended to 
 the list of existing Parts.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>part</CODE> - The Part to be appended<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<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="addBodyPart(javax.mail.BodyPart, int)"><!-- --></A><H3>
addBodyPart</H3>
<PRE>
public void <B>addBodyPart</B>(<A HREF="../../javax/mail/BodyPart.html">BodyPart</A>&nbsp;part,
                        int&nbsp;index)
                 throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Adds a BodyPart at position <code>index</code>.
 If <code>index</code> is not the last one in the list,
 the subsequent parts are shifted up. If <code>index</code>
 is larger than the number of parts present, the
 BodyPart is appended to the end.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>part</CODE> - The BodyPart to be inserted<DD><CODE>index</CODE> - Location where to insert the part<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<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="writeTo(java.io.OutputStream)"><!-- --></A><H3>
writeTo</H3>
<PRE>
public abstract void <B>writeTo</B>(java.io.OutputStream&nbsp;os)
                      throws java.io.IOException,
                             <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Output an appropriately encoded bytestream to the given
 OutputStream. The implementation subclass decides the
 appropriate encoding algorithm to be used. The bytestream
 is typically used for sending.<DD><DL>
<DT><B>Throws:</B><DD>java.io.IOException - if an IO related exception occurs<DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../javax/mail/Part.html">Part</A> <B>getParent</B>()</PRE>
<DL>
<DD>Return the <code>Part</code> that contains this <code>Multipart</code>
 object, or <code>null</code> if not known.<DD><DL>
<DT><B>Since: </B><DD>JavaMail 1.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setParent(javax.mail.Part)"><!-- --></A><H3>
setParent</H3>
<PRE>
public void <B>setParent</B>(<A HREF="../../javax/mail/Part.html">Part</A>&nbsp;parent)</PRE>
<DL>
<DD>Set the parent of this <code>Multipart</code> to be the specified
 <code>Part</code>.  Normally called by the <code>Message</code>
 or <code>BodyPart</code> <code>setContent(Multipart)</code> method.
 <code>parent</code> may be <code>null</code> if the
 <code>Multipart</code> is being removed from its containing
 <code>Part</code>.<DD><DL>
<DT><B>Since: </B><DD>JavaMail 1.1</DD>
</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Multipart.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/mail/MessageContext.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/mail/PasswordAuthentication.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>  &nbsp;
&nbsp;<A HREF="Multipart.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -