<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:40 PST 2009 -->
<
META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
MimeMultipart (JavaMail API documentation)
<
META NAME="date" CONTENT="2009-11-17">
<
LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<
SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MimeMultipart (JavaMail API documentation)";
}
}
<
BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<
A NAME="navbar_top"><!-- --><
/A>
<
A HREF="#skip-navbar_top" title="Skip navigation links"><
/A>
<
TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<
TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<
A NAME="navbar_top_firstrow"><!-- --><
/A>
<
TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<
TR ALIGN="center" VALIGN="top">
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../overview-summary.html"><
FONT CLASS="NavBarFont1"><
B>Overview<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-summary.html"><
FONT CLASS="NavBarFont1"><
B>Package<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Class<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="class-use/MimeMultipart.html"><
FONT CLASS="NavBarFont1"><
B>Use<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../index-files/index-1.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html" title="class in javax.mail.internet"><
B>PREV CLASS<
/B><
/A>
<
A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet"><
B>NEXT CLASS<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../index.html?javax/mail/internet/MimeMultipart.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="MimeMultipart.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
SUMMARY: NESTED | <
A HREF="#field_summary">FIELD<
/A> | <
A HREF="#constructor_summary">CONSTR<
/A> | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: <
A HREF="#field_detail">FIELD<
/A> | <
A HREF="#constructor_detail">CONSTR<
/A> | <
A HREF="#method_detail">METHOD<
/A><
/FONT><
/TD>
<
A NAME="skip-navbar_top"><
/A>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
javax.mail.internet<
/FONT>
<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.
lang.Object<
/A>
<
IMG SRC="../../../resources/inherit.gif" ALT="extended by "><
A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">javax.mail.Multipart<
/A>
<
IMG SRC="../../../resources/inherit.gif" ALT="extended by "><
B>javax.mail.internet.MimeMultipart<
/B>
<
DT><
B>Direct Known Subclasses:<
/B> <
DD><
A HREF="../../../com/sun/mail/dsn/MultipartReport.html" title="class in com.sun.mail.dsn">MultipartReport<
/A><
/DD>
<
DT><
PRE>public
class <
B>MimeMultipart<
/B><
DT>extends <
A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart<
/A><
/DL>
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>
The <code>mail.mime.multipart.ignoremissingendboundary</code>
property may be set to <code>false</code> to cause a
<code>MessagingException</code> to be thrown if the multipart
data does not end with the required end boundary line. If this
property is set to <code>true</code> or not set, missing end
boundaries are not considered an error and the final body part
ends at the end of the data. <p>
The <code>mail.mime.multipart.ignoremissingboundaryparameter</code>
System property may be set to <code>false</code> to cause a
<code>MessagingException</code> to be thrown if the Content-Type
of the MimeMultipart does not include a <code>boundary</code> parameter.
If this property is set to <code>true</code> or not set, the multipart
parsing code will look for a line that looks like a bounary line and
use that as the boundary separating the parts. <p>
The current implementation also supports the following properties: <p>
The <code>mail.mime.multipart.ignoreexistingboundaryparameter</code>
System property may be set to <code>true</code> to cause any boundary
to be ignored and instead search for a boundary line in the message
as with <code>mail.mime.multipart.ignoremissingboundaryparameter</code>. <p>
Normally, when writing out a MimeMultipart that contains no body
parts, or when trying to parse a multipart message with no body parts,
a <code>MessagingException</code> is thrown. The MIME spec does not allow
multipart content with no body parts. The
<code>mail.mime.multipart.allowempty</code> System property may be set to
<code>true</code> to override this behavior.
When writing out such a MimeMultipart, a single empty part will be
included. When reading such a multipart, a MimeMultipart will be created
with no body parts.
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#ds">ds</A></B></CODE>
<BR>
The DataSource supplying our InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#parsed">parsed</A></B></CODE>
<BR>
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>
<A NAME="fields_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>Fields 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#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>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#MimeMultipart()">MimeMultipart</A></B>()</CODE>
<BR>
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>(<A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</A> ds)</CODE>
<BR>
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>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> subtype)</CODE>
<BR>
Construct a MimeMultipart object of the given subtype.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#addBodyPart(javax.mail.BodyPart)">addBodyPart</A></B>(<A HREF="../../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A> part)</CODE>
<BR>
Adds a Part to the multipart.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#addBodyPart(javax.mail.BodyPart, int)">addBodyPart</A></B>(<A HREF="../../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A> part,
int index)</CODE>
<BR>
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 <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.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)</CODE>
<BR>
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 <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.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)</CODE>
<BR>
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 <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> headers,
byte[] content)</CODE>
<BR>
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> <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 index)</CODE>
<BR>
Get the specified BodyPart.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <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.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> CID)</CODE>
<BR>
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> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#getCount()">getCount</A></B>()</CODE>
<BR>
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> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" 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>
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> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#isComplete()">isComplete</A></B>()</CODE>
<BR>
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 void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#parse()">parse</A></B>()</CODE>
<BR>
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> 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> part)</CODE>
<BR>
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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#removeBodyPart(int)">removeBodyPart</A></B>(int index)</CODE>
<BR>
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> 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.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> preamble)</CODE>
<BR>
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> 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.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> subtype)</CODE>
<BR>
Set the subtype.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMultipart.html#updateHeaders()">updateHeaders</A></B>()</CODE>
<BR>
Update headers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> 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.4.2/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os)</CODE>
<BR>
Iterates through all the parts and outputs each MIME part
separated by a boundary.</TD>
</TR>
</TABLE>
<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>
<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.4.2/docs/api/java/lang/Object.html?is-external=true" 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.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<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="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or 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.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> 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="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</A> 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>
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.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>ds</CODE> - DataSource, can be a MultipartDataSource
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_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>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setSubType(java.lang.String)"><!-- --></A><H3>
setSubType</H3>
<PRE>
public void <B>setSubType</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> subtype)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>subtype</CODE> - Subtype
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getCount()"><!-- --></A><H3>
getCount</H3>
<PRE>
public int <B>getCount</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Return the number of enclosed BodyPart objects.
<P>
<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" title="class in javax.mail">Multipart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>number of parts
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/Multipart.html#parts"><CODE>Multipart.parts</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getBodyPart(int)"><!-- --></A><H3>
getBodyPart</H3>
<PRE>
public <A HREF="../../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A> <B>getBodyPart</B>(int index)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the specified BodyPart. BodyParts are numbered starting at 0.
<P>
<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" title="class in javax.mail">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" title="class in javax.mail">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" title="class in javax.mail">BodyPart</A> <B>getBodyPart</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> CID)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the MimeBodyPart referred to by the given ContentID (CID).
Returns null if the part is not found.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>CID</CODE> - the ContentID of the desired part
<DT><B>Returns:</B><DD>the Part
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></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" title="class in javax.mail">BodyPart</A> part)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Remove the specified part from the multipart message.
Shifts all the parts after the removed part down one.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#removeBodyPart(javax.mail.BodyPart)">removeBodyPart</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A></CODE></DL>
</DD>
<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" title="class in javax.mail">MessagingException</A></CODE> - if no such Part exists
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">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 index)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Remove the part at specified location (starting from 0).
Shifts all the parts after the removed part down one.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#removeBodyPart(int)">removeBodyPart</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A></CODE></DL>
</DD>
<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" title="class in javax.mail">MessagingException</A></CODE>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the given index
is out of range.
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">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" title="class in javax.mail">BodyPart</A> part)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Adds a Part to the multipart. The BodyPart is appended to
the list of existing Parts.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart)">addBodyPart</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A></CODE></DL>
</DD>
<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" title="class in javax.mail">MessagingException</A></CODE>
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">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" title="class in javax.mail">BodyPart</A> part,
int index)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart, int)">addBodyPart</A></CODE> in class <CODE><A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A></CODE></DL>
</DD>
<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" title="class in javax.mail">MessagingException</A></CODE>
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
implementation does not support modification
of existing values</DL>
</DD>
</DL>
<HR>
<A NAME="isComplete()"><!-- --></A><H3>
isComplete</H3>
<PRE>
public boolean <B>isComplete</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Return true if the final boundary line for this
multipart was seen. When parsing multipart content,
this class will (by default) terminate parsing with
no error if the end of input is reached before seeing
the final multipart boundary line. In such a case,
this method will return false. (If the System property
"mail.mime.multipart.ignoremissingendboundary" is set to
false, parsing such a message will instead throw a
MessagingException.)
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if the final boundary line was seen
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.4</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getPreamble()"><!-- --></A><H3>
getPreamble</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getPreamble</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the preamble text, if any, that appears before the
first body part of this multipart. Some protocols,
such as IMAP, will not allow access to the preamble text.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the preamble text, or null if no preamble
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.4</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setPreamble(java.lang.String)"><!-- --></A><H3>
setPreamble</H3>
<PRE>
public void <B>setPreamble</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> preamble)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the preamble text to be included before the first
body part. Applications should generally not include
any preamble text. In some cases it may be helpful to
include preamble text with instructions for users of
pre-MIME software. The preamble text should be complete
lines, including newlines.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>preamble</CODE> - the preamble text
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.4</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="updateHeaders()"><!-- --></A><H3>
updateHeaders</H3>
<PRE>
protected void <B>updateHeaders</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
writeTo</H3>
<PRE>
public void <B>writeTo</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
<A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Iterates through all the parts and outputs each MIME part
separated by a boundary.
<P>
<DD><DL>
<DT><B>Specified by:</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" title="class in javax.mail">Multipart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an IO related exception occurs
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="parse()"><!-- --></A><H3>
parse</H3>
<PRE>
protected void <B>parse</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<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" title="class in javax.mail.internet">InternetHeaders</A> <B>createInternetHeaders</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<P>
<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" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<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" title="class in javax.mail.internet">MimeBodyPart</A> <B>createMimeBodyPart</B>(<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A> headers,
byte[] content)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<P>
<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" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<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" title="class in javax.mail.internet">MimeBodyPart</A> <B>createMimeBodyPart</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<P>
<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" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MimeMultipart.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>
<A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?javax/mail/internet/MimeMultipart.html" target="_top"><B>FRAMES</B></A>
<A HREF="MimeMultipart.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<
A HREF="../../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
</BODY>
</HTML>