<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Jun 25 00:04:11 PDT 2003 -->
<TITLE>
JavaMail API documentation: Class  MimeMultipart
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MimeMultipart.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="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" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/mail/internet/MimePartDataSource.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MimeMultipart.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="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" CLASS="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>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.mail.internet</FONT>
<BR>
Class  MimeMultipart</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../javax/mail/Multipart.html">javax.mail.Multipart</A>
        |
        +--<B>javax.mail.internet.MimeMultipart</B>
</PRE>
<HR>
<DL>
<DT>public class <B>MimeMultipart</B><DT>extends <A HREF="../../../javax/mail/Multipart.html">Multipart</A></DL>

<P>
The MimeMultipart class is an implementation of the abstract Multipart
 class that uses MIME conventions for the multipart data. <p>

 A MimeMultipart is obtained from a MimePart whose primary type
 is "multipart" (by invoking the part's <code>getContent()</code> method)
 or it can be created by a client as part of creating a new MimeMessage. <p>

 The default multipart subtype is "mixed".  The other multipart
 subtypes, such as "alternative", "related", and so on, can be
 implemented as subclasses of MimeMultipart with additional methods
 to implement the additional semantics of that type of multipart
 content. The intent is that service providers, mail JavaBean writers
 and mail clients will write many such subclasses and their Command
 Beans, and will install them into the JavaBeans Activation
 Framework, so that any JavaMail implementation and its clients can
 transparently find and use these classes. Thus, a MIME multipart
 handler is treated just like any other type handler, thereby
 decoupling the process of providing multipart handlers from the
 JavaMail API. Lacking these additional MimeMultipart subclasses,
 all subtypes of MIME multipart data appear as MimeMultipart objects. <p>

 An application can directly construct a MIME multipart object of any
 subtype by using the <code>MimeMultipart(String subtype)</code>
 constructor.  For example, to create a "multipart/alternative" object,
 use <code>new MimeMultipart("alternative")</code>.
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;javax.activation.DataSource</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#ds">ds</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The DataSource supplying our InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#parsed">parsed</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_javax.mail.Multipart"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.mail.<A HREF="../../../javax/mail/Multipart.html">Multipart</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/Multipart.html#contentType">contentType</A>, <A HREF="../../../javax/mail/Multipart.html#parent">parent</A>, <A HREF="../../../javax/mail/Multipart.html#parts">parts</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#MimeMultipart()">MimeMultipart</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#MimeMultipart(javax.activation.DataSource)">MimeMultipart</A></B>(javax.activation.DataSource&nbsp;ds)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a MimeMultipart object and its bodyparts from the 
 given DataSource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#MimeMultipart(java.lang.String)">MimeMultipart</A></B>(java.lang.String&nbsp;subtype)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a MimeMultipart object of the given subtype.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></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">InternetHeaders</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#createInternetHeaders(java.io.InputStream)">createInternetHeaders</A></B>(java.io.InputStream&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">MimeBodyPart</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#createMimeBodyPart(java.io.InputStream)">createMimeBodyPart</A></B>(java.io.InputStream&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">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">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">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">BodyPart</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#getBodyPart(java.lang.String)">getBodyPart</A></B>(java.lang.String&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>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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#setSubType(java.lang.String)">setSubType</A></B>(java.lang.String&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>(java.io.OutputStream&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" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.mail.<A HREF="../../../javax/mail/Multipart.html">Multipart</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart)">addBodyPart</A>, <A HREF="../../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart, int)">addBodyPart</A>, <A HREF="../../../javax/mail/Multipart.html#getContentType()">getContentType</A>, <A HREF="../../../javax/mail/Multipart.html#getParent()">getParent</A>, <A HREF="../../../javax/mail/Multipart.html#removeBodyPart(javax.mail.BodyPart)">removeBodyPart</A>, <A HREF="../../../javax/mail/Multipart.html#removeBodyPart(int)">removeBodyPart</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" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

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

<A NAME="ds"><!-- --></A><H3>
ds</H3>
<PRE>
protected javax.activation.DataSource <B>ds</B></PRE>
<DL>
<DD>The DataSource supplying our InputStream.</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.</DL>

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

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</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.</DL>
<HR>

<A NAME="MimeMultipart(java.lang.String)"><!-- --></A><H3>
MimeMultipart</H3>
<PRE>
public <B>MimeMultipart</B>(java.lang.String&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.</DL>
<HR>

<A NAME="MimeMultipart(javax.activation.DataSource)"><!-- --></A><H3>
MimeMultipart</H3>
<PRE>
public <B>MimeMultipart</B>(javax.activation.DataSource&nbsp;ds)
              throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Constructs a MimeMultipart object and its bodyparts from the 
 given DataSource. <p>

 This constructor handles as a special case the situation where the
 given DataSource is a MultipartDataSource object.  In this case, this
 method just invokes the superclass (i.e., Multipart) constructor
 that takes a MultipartDataSource object. <p>

 Otherwise, the DataSource is assumed to provide a MIME multipart 
 byte stream.  The <code>parsed</code> flag is set to false.  When
 the data for the body parts are needed, the parser extracts the
 "boundary" parameter from the content type of this DataSource,
 skips the 'preamble' and reads bytes till the terminating
 boundary and creates MimeBodyParts for each part of the stream.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ds</CODE> - DataSource, can be a MultipartDataSource</DL>
</DD>
</DL>

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

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

<A NAME="setSubType(java.lang.String)"><!-- --></A><H3>
setSubType</H3>
<PRE>
public void <B>setSubType</B>(java.lang.String&nbsp;subtype)
                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the subtype. This method should be invoked only on a new
 MimeMultipart object created by the client. The default subtype
 of such a multipart object is "mixed". <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>subtype</CODE> - Subtype</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.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#getCount()">getCount</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html">Multipart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>number of parts</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 BodyPart.  BodyParts are numbered starting at 0.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#getBodyPart(int)">getBodyPart</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html">Multipart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired BodyPart<DT><B>Returns:</B><DD>the Part<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - if no such BodyPart exists</DL>
</DD>
</DL>
<HR>

<A NAME="getBodyPart(java.lang.String)"><!-- --></A><H3>
getBodyPart</H3>
<PRE>
public <A HREF="../../../javax/mail/BodyPart.html">BodyPart</A> <B>getBodyPart</B>(java.lang.String&nbsp;CID)
                     throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the MimeBodyPart referred to by the given ContentID (CID). 
 Returns null if the part is not found.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>CID</CODE> - the ContentID of the desired part<DT><B>Returns:</B><DD>the Part</DL>
</DD>
</DL>
<HR>

<A NAME="updateHeaders()"><!-- --></A><H3>
updateHeaders</H3>
<PRE>
protected void <B>updateHeaders</B>()
                      throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Update headers. The default implementation here just
 calls the <code>updateHeaders</code> method on each of its
 children BodyParts. <p>

 Note that the boundary parameter is already set up when
 a new and empty MimeMultipart object is created. <p>

 This method is called when the <code>saveChanges</code>
 method is invoked on the Message object containing this
 Multipart. This is typically done as part of the Message
 send process, however note that a client is free to call
 it any number of times. So if the header updating process is 
 expensive for a specific MimeMultipart subclass, then it
 might itself want to track whether its internal state actually
 did change, and do the header updating only if necessary.</DL>
<HR>

<A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
writeTo</H3>
<PRE>
public void <B>writeTo</B>(java.io.OutputStream&nbsp;os)
             throws java.io.IOException,
                    <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Iterates through all the parts and outputs each Mime part
 separated by a boundary.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#writeTo(java.io.OutputStream)">writeTo</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html">Multipart</A></CODE></DL>
</DD>
<DD>Following copied from class: <CODE>javax.mail.Multipart</CODE></DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an IO related exception occurs<DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="parse()"><!-- --></A><H3>
parse</H3>
<PRE>
protected void <B>parse</B>()
              throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Parse the InputStream from our DataSource, constructing the
 appropriate MimeBodyParts.  The <code>parsed</code> flag is
 set to true, and if true on entry nothing is done.  This
 method is called by all other methods that need data for
 the body parts, to make sure the data has been parsed.<DD><DL>
<DT><B>Since: </B><DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="createInternetHeaders(java.io.InputStream)"><!-- --></A><H3>
createInternetHeaders</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/InternetHeaders.html">InternetHeaders</A> <B>createInternetHeaders</B>(java.io.InputStream&nbsp;is)
                                         throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Create and return an InternetHeaders object that loads the
 headers from the given InputStream.  Subclasses can override
 this method to return a subclass of InternetHeaders, if
 necessary.  This implementation simply constructs and returns
 an InternetHeaders object.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - the InputStream to read the headers from<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DT><B>Since: </B><DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="createMimeBodyPart(javax.mail.internet.InternetHeaders, byte[])"><!-- --></A><H3>
createMimeBodyPart</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/MimeBodyPart.html">MimeBodyPart</A> <B>createMimeBodyPart</B>(<A HREF="../../../javax/mail/internet/InternetHeaders.html">InternetHeaders</A>&nbsp;headers,
                                          byte[]&nbsp;content)
                                   throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Create and return a MimeBodyPart object to represent a
 body part parsed from the InputStream.  Subclasses can override
 this method to return a subclass of MimeBodyPart, if
 necessary.  This implementation simply constructs and returns
 a MimeBodyPart object.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>headers</CODE> - the headers for the body part<DD><CODE>content</CODE> - the content of the body part<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DT><B>Since: </B><DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="createMimeBodyPart(java.io.InputStream)"><!-- --></A><H3>
createMimeBodyPart</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/MimeBodyPart.html">MimeBodyPart</A> <B>createMimeBodyPart</B>(java.io.InputStream&nbsp;is)
                                   throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Create and return a MimeBodyPart object to represent a
 body part parsed from the InputStream.  Subclasses can override
 this method to return a subclass of MimeBodyPart, if
 necessary.  This implementation simply constructs and returns
 a MimeBodyPart object.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - InputStream containing the body part<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DT><B>Since: </B><DD>JavaMail 1.2</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" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MimeMultipart.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="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" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/mail/internet/MimePartDataSource.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MimeMultipart.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="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" CLASS="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>
