<!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:08 PDT 2003 -->
<TITLE>
JavaMail API documentation: Class  Multipart
</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/Multipart.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/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" CLASS="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" 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</FONT>
<BR>
Class  Multipart</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.mail.Multipart</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../javax/mail/internet/MimeMultipart.html">MimeMultipart</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract class <B>Multipart</B><DT>extends java.lang.Object</DL>

<P>
Multipart is a container that holds multiple body parts. Multipart
 provides methods to retrieve and set its subparts. <p>
 
 Multipart also acts as the base class for the content object returned 
 by most Multipart DataContentHandlers. For example, invoking getContent()
 on a DataHandler whose source is a "multipart/signed" data source may
 return an appropriate subclass of Multipart. <p>

 Some messaging systems provide different subtypes of Multiparts. For
 example, MIME specifies a set of subtypes that include "alternative", 
 "mixed", "related", "parallel", "signed", etc. <p>

 Multipart is an abstract class.  Subclasses provide actual implementations.
<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;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#contentType">contentType</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field specifies the content-type of this multipart
 object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../javax/mail/Part.html">Part</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#parent">parent</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <code>Part</code> containing this <code>Multipart</code>,
 if known.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#parts">parts</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vector of BodyPart objects.</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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#Multipart()">Multipart</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart)">addBodyPart</A></B>(<A HREF="../../javax/mail/BodyPart.html">BodyPart</A>&nbsp;part)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Part to the multipart.</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/Multipart.html#addBodyPart(javax.mail.BodyPart, int)">addBodyPart</A></B>(<A HREF="../../javax/mail/BodyPart.html">BodyPart</A>&nbsp;part,
            int&nbsp;index)</CODE>

<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>&nbsp;<A HREF="../../javax/mail/BodyPart.html">BodyPart</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getBodyPart(int)">getBodyPart</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the specified Part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getContentType()">getContentType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the content-type of this Multipart.</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/Multipart.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="../../javax/mail/Part.html">Part</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getParent()">getParent</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the <code>Part</code> that contains this <code>Multipart</code>
 object, or <code>null</code> if not known.</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/Multipart.html#removeBodyPart(javax.mail.BodyPart)">removeBodyPart</A></B>(<A HREF="../../javax/mail/BodyPart.html">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/Multipart.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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.html#setMultipartDataSource(javax.mail.MultipartDataSource)">setMultipartDataSource</A></B>(<A HREF="../../javax/mail/MultipartDataSource.html">MultipartDataSource</A>&nbsp;mp)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setup this Multipart object from the given MultipartDataSource.</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/Multipart.html#setParent(javax.mail.Part)">setParent</A></B>(<A HREF="../../javax/mail/Part.html">Part</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the parent of this <code>Multipart</code> to be the specified
 <code>Part</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/mail/Multipart.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;Output an appropriately encoded bytestream to the given
 OutputStream.</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="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" CLASS="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" CLASS="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><CODE>IndexOutOfBoundsException</CODE> - if the given index
			is out of range.<DD><CODE><A HREF="../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &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><CODE><A HREF="../../javax/mail/MessagingException.html">MessagingException</A></CODE> - if no such Part exists<DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - 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><CODE><A HREF="../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DD><CODE>IndexOutOfBoundsException</CODE> - if the given index
			is out of range.<DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - 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><CODE><A HREF="../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - 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><CODE><A HREF="../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - 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><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="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" 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/Multipart.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/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" CLASS="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" 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>
