<!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  MimeBodyPart
</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/MimeBodyPart.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/MailDateFormat.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.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="MimeBodyPart.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  MimeBodyPart</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../javax/mail/BodyPart.html">javax.mail.BodyPart</A>
        |
        +--<B>javax.mail.internet.MimeBodyPart</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A>, <A HREF="../../../javax/mail/Part.html">Part</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>MimeBodyPart</B><DT>extends <A HREF="../../../javax/mail/BodyPart.html">BodyPart</A><DT>implements <A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></DL>

<P>
This class represents a MIME body part. It implements the 
 <code>BodyPart</code> abstract class and the <code>MimePart</code>
 interface. MimeBodyParts are contained in <code>MimeMultipart</code>
 objects. <p>

 MimeBodyPart uses the <code>InternetHeaders</code> class to parse
 and store the headers of that body part. <p>

 <hr><strong>A note on RFC 822 and MIME headers</strong><p>

 RFC 822 header fields <strong>must</strong> contain only
 US-ASCII characters. MIME allows non ASCII characters to be present
 in certain portions of certain headers, by encoding those characters.
 RFC 2047 specifies the rules for doing this. The MimeUtility
 class provided in this package can be used to to achieve this.
 Callers of the <code>setHeader</code>, <code>addHeader</code>, and
 <code>addHeaderLine</code> methods are responsible for enforcing
 the MIME requirements for the specified headers.  In addition, these
 header fields must be folded (wrapped) before being sent if they
 exceed the line length limitation for the transport (1000 bytes for
 SMTP).  Received headers may have been folded.  The application is
 responsible for folding and unfolding headers as appropriate. <p>
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/Part.html"><CODE>Part</CODE></A>, 
<A HREF="../../../javax/mail/internet/MimePart.html"><CODE>MimePart</CODE></A>, 
<A HREF="../../../javax/mail/internet/MimeUtility.html"><CODE>MimeUtility</CODE></A></DL>
<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;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#content">content</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Byte array that holds the bytes of the content of this Part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#contentStream">contentStream</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the data for this body part was supplied by an
 InputStream that implements the SharedInputStream interface,
 <code>contentStream</code> is another such stream representing
 the content of this body part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;javax.activation.DataHandler</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#dh">dh</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The DataHandler object representing this Part's content.</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/MimeBodyPart.html#headers">headers</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The InternetHeaders object that stores all the headers
 of this body part.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_javax.mail.BodyPart"><!-- --></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/BodyPart.html">BodyPart</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/BodyPart.html#parent">parent</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_javax.mail.Part"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface javax.mail.<A HREF="../../../javax/mail/Part.html">Part</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/Part.html#ATTACHMENT">ATTACHMENT</A>, <A HREF="../../../javax/mail/Part.html#INLINE">INLINE</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/MimeBodyPart.html#MimeBodyPart()">MimeBodyPart</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An empty MimeBodyPart object is created.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#MimeBodyPart(java.io.InputStream)">MimeBodyPart</A></B>(java.io.InputStream&nbsp;is)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a MimeBodyPart by reading and parsing the data from
 the specified input stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#MimeBodyPart(javax.mail.internet.InternetHeaders, byte[])">MimeBodyPart</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;Constructs a MimeBodyPart using the given header and
 content bytes.</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/internet/MimeBodyPart.html#addHeader(java.lang.String, java.lang.String)">addHeader</A></B>(java.lang.String&nbsp;name,
          java.lang.String&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add this value to the existing values for this header_name.</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/MimeBodyPart.html#addHeaderLine(java.lang.String)">addHeaderLine</A></B>(java.lang.String&nbsp;line)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a header line to this body part</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getAllHeaderLines()">getAllHeaderLines</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all header lines as an Enumeration of Strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getAllHeaders()">getAllHeaders</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return all the headers from this Message as an Enumeration of
 Header objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getContent()">getContent</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the content as a java object.</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/internet/MimeBodyPart.html#getContentID()">getContentID</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the "Content-ID" header field.</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/internet/MimeBodyPart.html#getContentLanguage()">getContentLanguage</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the languages specified in the Content-Language header
 of this MimePart.</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/internet/MimeBodyPart.html#getContentMD5()">getContentMD5</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the value of the "Content-MD5" header field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getContentStream()">getContentStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce the raw bytes of the content.</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/internet/MimeBodyPart.html#getContentType()">getContentType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the RFC 822 "Content-Type" header field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;javax.activation.DataHandler</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getDataHandler()">getDataHandler</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a DataHandler for this body part's content.</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/internet/MimeBodyPart.html#getDescription()">getDescription</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the "Content-Description" header field of this body 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/internet/MimeBodyPart.html#getDisposition()">getDisposition</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the "Content-Disposition" header field.</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/internet/MimeBodyPart.html#getEncoding()">getEncoding</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the content transfer encoding from the
 "Content-Transfer-Encoding" header
 field.</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/internet/MimeBodyPart.html#getFileName()">getFileName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the filename associated with this body 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/internet/MimeBodyPart.html#getHeader(java.lang.String)">getHeader</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the headers for this header_name.</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/internet/MimeBodyPart.html#getHeader(java.lang.String, java.lang.String)">getHeader</A></B>(java.lang.String&nbsp;name,
          java.lang.String&nbsp;delimiter)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the headers for this header name, returned as a single
 String, with headers separated by the delimiter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getInputStream()">getInputStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a decoded input stream for this body part's "content".</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/MimeBodyPart.html#getLineCount()">getLineCount</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number of lines for the content of this Part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getMatchingHeaderLines(java.lang.String[])">getMatchingHeaderLines</A></B>(java.lang.String[]&nbsp;names)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get matching header lines as an Enumeration of Strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getMatchingHeaders(java.lang.String[])">getMatchingHeaders</A></B>(java.lang.String[]&nbsp;names)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return matching headers from this Message as an Enumeration of
 Header objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getNonMatchingHeaderLines(java.lang.String[])">getNonMatchingHeaderLines</A></B>(java.lang.String[]&nbsp;names)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get non-matching header lines as an Enumeration of Strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getNonMatchingHeaders(java.lang.String[])">getNonMatchingHeaders</A></B>(java.lang.String[]&nbsp;names)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return non-matching headers from this Message as an
 Enumeration of Header objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getRawInputStream()">getRawInputStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an InputStream to the raw data with any Content-Transfer-Encoding
 intact.</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/MimeBodyPart.html#getSize()">getSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the size of the content of this body part in bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#isMimeType(java.lang.String)">isMimeType</A></B>(java.lang.String&nbsp;mimeType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is this Part of the specified MIME type?  This method
 compares <strong>only the <code>primaryType</code> and 
 <code>subType</code></strong>.</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/MimeBodyPart.html#removeHeader(java.lang.String)">removeHeader</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove all headers with this name.</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/MimeBodyPart.html#setContent(javax.mail.Multipart)">setContent</A></B>(<A HREF="../../../javax/mail/Multipart.html">Multipart</A>&nbsp;mp)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method sets the body part's content to a Multipart object.</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/MimeBodyPart.html#setContent(java.lang.Object, java.lang.String)">setContent</A></B>(java.lang.Object&nbsp;o,
           java.lang.String&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method for setting this body part's content.</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/MimeBodyPart.html#setContentID(java.lang.String)">setContentID</A></B>(java.lang.String&nbsp;cid)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-ID" header field of this body part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#setContentLanguage(java.lang.String[])">setContentLanguage</A></B>(java.lang.String[]&nbsp;languages)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the Content-Language header of this MimePart.</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/MimeBodyPart.html#setContentMD5(java.lang.String)">setContentMD5</A></B>(java.lang.String&nbsp;md5)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-MD5" header field of this body part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#setDataHandler(javax.activation.DataHandler)">setDataHandler</A></B>(javax.activation.DataHandler&nbsp;dh)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method provides the mechanism to set this body part's content.</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/MimeBodyPart.html#setDescription(java.lang.String)">setDescription</A></B>(java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Description" header field for this body part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#setDescription(java.lang.String, java.lang.String)">setDescription</A></B>(java.lang.String&nbsp;description,
               java.lang.String&nbsp;charset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Description" header field for this body part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#setDisposition(java.lang.String)">setDisposition</A></B>(java.lang.String&nbsp;disposition)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Disposition" header field of this body part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeBodyPart.html#setFileName(java.lang.String)">setFileName</A></B>(java.lang.String&nbsp;filename)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the filename associated with this body part, if possible.</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/MimeBodyPart.html#setHeader(java.lang.String, java.lang.String)">setHeader</A></B>(java.lang.String&nbsp;name,
          java.lang.String&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value for this header_name.</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/MimeBodyPart.html#setText(java.lang.String)">setText</A></B>(java.lang.String&nbsp;text)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this
 part's content, with a MIME type of "text/plain".</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/MimeBodyPart.html#setText(java.lang.String, java.lang.String)">setText</A></B>(java.lang.String&nbsp;text,
        java.lang.String&nbsp;charset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this part's
 content, with a MIME type of "text/plain" and the specified
 charset.</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/MimeBodyPart.html#updateHeaders()">updateHeaders</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Examine the content of this body part and update the appropriate
 MIME 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/MimeBodyPart.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 the body part as an RFC 822 format stream.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.mail.BodyPart"><!-- --></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/BodyPart.html">BodyPart</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/BodyPart.html#getParent()">getParent</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="dh"><!-- --></A><H3>
dh</H3>
<PRE>
protected javax.activation.DataHandler <B>dh</B></PRE>
<DL>
<DD>The DataHandler object representing this Part's content.</DL>
<HR>

<A NAME="content"><!-- --></A><H3>
content</H3>
<PRE>
protected byte[] <B>content</B></PRE>
<DL>
<DD>Byte array that holds the bytes of the content of this Part.</DL>
<HR>

<A NAME="contentStream"><!-- --></A><H3>
contentStream</H3>
<PRE>
protected java.io.InputStream <B>contentStream</B></PRE>
<DL>
<DD>If the data for this body part was supplied by an
 InputStream that implements the SharedInputStream interface,
 <code>contentStream</code> is another such stream representing
 the content of this body part.  In this case, <code>content</code>
 will be null.<DD><DL>
<DT><B>Since: </B><DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="headers"><!-- --></A><H3>
headers</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/InternetHeaders.html">InternetHeaders</A> <B>headers</B></PRE>
<DL>
<DD>The InternetHeaders object that stores all the headers
 of this body part.</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="MimeBodyPart()"><!-- --></A><H3>
MimeBodyPart</H3>
<PRE>
public <B>MimeBodyPart</B>()</PRE>
<DL>
<DD>An empty MimeBodyPart object is created.
 This body part maybe filled in by a client constructing a multipart
 message.</DL>
<HR>

<A NAME="MimeBodyPart(java.io.InputStream)"><!-- --></A><H3>
MimeBodyPart</H3>
<PRE>
public <B>MimeBodyPart</B>(java.io.InputStream&nbsp;is)
             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Constructs a MimeBodyPart by reading and parsing the data from
 the specified input stream. The parser consumes data till the end
 of the given input stream.  The input stream must start at the
 beginning of a valid MIME body part and must terminate at the end
 of that body part. <p>

 Note that the "boundary" string that delimits body parts must 
 <strong>not</strong> be included in the input stream. The intention 
 is that the MimeMultipart parser will extract each body part's bytes
 from a multipart stream and feed them into this constructor, without 
 the delimiter strings.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - the body part Input Stream</DL>
</DD>
</DL>
<HR>

<A NAME="MimeBodyPart(javax.mail.internet.InternetHeaders, byte[])"><!-- --></A><H3>
MimeBodyPart</H3>
<PRE>
public <B>MimeBodyPart</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>Constructs a MimeBodyPart using the given header and
 content bytes. <p>

 Used by providers.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>headers</CODE> - The header of this part<DD><CODE>content</CODE> - bytes representing the body of this part.</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="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
public int <B>getSize</B>()
            throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return the size of the content of this body part in bytes.
 Return -1 if the size cannot be determined. <p>

 Note that this number may not be an exact measure of the
 content size and may or may not account for any transfer
 encoding of the content. <p>

 This implementation returns the size of the <code>content</code>
 array (if not null), or, if <code>contentStream</code> is not
 null, and the <code>available</code> method returns a positive
 number, it returns that number as the size.  Otherwise, it returns
 -1.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getSize()">getSize</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>size in bytes, or -1 if not known</DL>
</DD>
</DL>
<HR>

<A NAME="getLineCount()"><!-- --></A><H3>
getLineCount</H3>
<PRE>
public int <B>getLineCount</B>()
                 throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return the number of lines for the content of this Part.
 Return -1 if this number cannot be determined. <p>

 Note that this number may not be an exact measure of the 
 content length and may or may not account for any transfer 
 encoding of the content. <p>

 This implementation returns -1.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getLineCount()">getLineCount</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>number of lines, or -1 if not known</DL>
</DD>
</DL>
<HR>

<A NAME="getContentType()"><!-- --></A><H3>
getContentType</H3>
<PRE>
public java.lang.String <B>getContentType</B>()
                                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the RFC 822 "Content-Type" header field.
 This represents the content type of the content of this
 body part. This value must not be null. If this field is
 unavailable, "text/plain" should be returned. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getContentType()">getContentType</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Content-Type of this body part</DL>
</DD>
</DL>
<HR>

<A NAME="isMimeType(java.lang.String)"><!-- --></A><H3>
isMimeType</H3>
<PRE>
public boolean <B>isMimeType</B>(java.lang.String&nbsp;mimeType)
                   throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Is this Part of the specified MIME type?  This method
 compares <strong>only the <code>primaryType</code> and 
 <code>subType</code></strong>.
 The parameters of the content types are ignored. <p>

 For example, this method will return <code>true</code> when
 comparing a Part of content type <strong>"text/plain"</strong>
 with <strong>"text/plain; charset=foobar"</strong>. <p>

 If the <code>subType</code> of <code>mimeType</code> is the
 special character '*', then the subtype is ignored during the
 comparison.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#isMimeType(java.lang.String)">isMimeType</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getDisposition()"><!-- --></A><H3>
getDisposition</H3>
<PRE>
public java.lang.String <B>getDisposition</B>()
                                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the "Content-Disposition" header field.
 This represents the disposition of this part. The disposition
 describes how the part should be presented to the user. <p>

 If the Content-Disposition field is unavailable,
 null is returned. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getDisposition()">getDisposition</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#headers"><CODE>headers</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDisposition(java.lang.String)"><!-- --></A><H3>
setDisposition</H3>
<PRE>
public void <B>setDisposition</B>(java.lang.String&nbsp;disposition)
                    throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "Content-Disposition" header field of this body part.
 If the disposition is null, any existing "Content-Disposition"
 header field is removed.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setDisposition(java.lang.String)">setDisposition</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="getEncoding()"><!-- --></A><H3>
getEncoding</H3>
<PRE>
public java.lang.String <B>getEncoding</B>()
                             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns the content transfer encoding from the
 "Content-Transfer-Encoding" header
 field. Returns <code>null</code> if the header is unavailable
 or its value is absent. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getEncoding()">getEncoding</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#headers"><CODE>headers</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getContentID()"><!-- --></A><H3>
getContentID</H3>
<PRE>
public java.lang.String <B>getContentID</B>()
                              throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the "Content-ID" header field. Returns
 <code>null</code> if the field is unavailable or its value is 
 absent. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getContentID()">getContentID</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.internet.MimePart</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>content-ID</DL>
</DD>
</DL>
<HR>

<A NAME="setContentID(java.lang.String)"><!-- --></A><H3>
setContentID</H3>
<PRE>
public void <B>setContentID</B>(java.lang.String&nbsp;cid)
                  throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "Content-ID" header field of this body part.
 If the <code>cid</code> parameter is null, any existing 
 "Content-ID" is removed.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DT><B>Since: </B><DD>JavaMail 1.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getContentMD5()"><!-- --></A><H3>
getContentMD5</H3>
<PRE>
public java.lang.String <B>getContentMD5</B>()
                               throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return the value of the "Content-MD5" header field. Returns 
 <code>null</code> if this field is unavailable or its value
 is absent. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getContentMD5()">getContentMD5</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.internet.MimePart</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>content-MD5</DL>
</DD>
</DL>
<HR>

<A NAME="setContentMD5(java.lang.String)"><!-- --></A><H3>
setContentMD5</H3>
<PRE>
public void <B>setContentMD5</B>(java.lang.String&nbsp;md5)
                   throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "Content-MD5" header field of this body part.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#setContentMD5(java.lang.String)">setContentMD5</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="getContentLanguage()"><!-- --></A><H3>
getContentLanguage</H3>
<PRE>
public java.lang.String[] <B>getContentLanguage</B>()
                                      throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the languages specified in the Content-Language header
 of this MimePart. The Content-Language header is defined by
 RFC 1766. Returns <code>null</code> if this header is not
 available or its value is absent. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getContentLanguage()">getContentLanguage</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setContentLanguage(java.lang.String[])"><!-- --></A><H3>
setContentLanguage</H3>
<PRE>
public void <B>setContentLanguage</B>(java.lang.String[]&nbsp;languages)
                        throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the Content-Language header of this MimePart. The
 Content-Language header is defined by RFC 1766.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#setContentLanguage(java.lang.String[])">setContentLanguage</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>languages</CODE> - array of language tags</DL>
</DD>
</DL>
<HR>

<A NAME="getDescription()"><!-- --></A><H3>
getDescription</H3>
<PRE>
public java.lang.String <B>getDescription</B>()
                                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns the "Content-Description" header field of this body part.
 This typically associates some descriptive information with 
 this part. Returns null if this field is unavailable or its
 value is absent. <p>

 If the Content-Description field is encoded as per RFC 2047,
 it is decoded and converted into Unicode. If the decoding or 
 conversion fails, the raw data is returned as is. <p>

 This implementation uses <code>getHeader(name)</code>
 to obtain the requisite header field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getDescription()">getDescription</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>content description</DL>
</DD>
</DL>
<HR>

<A NAME="setDescription(java.lang.String)"><!-- --></A><H3>
setDescription</H3>
<PRE>
public void <B>setDescription</B>(java.lang.String&nbsp;description)
                    throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "Content-Description" header field for this body part.
 If the description parameter is <code>null</code>, then any 
 existing "Content-Description" fields are removed. <p>

 If the description contains non US-ASCII characters, it will 
 be encoded using the platform's default charset. If the 
 description contains only US-ASCII characters, no encoding 
 is done and it is used as is. <p>

 Note that if the charset encoding process fails, a
 MessagingException is thrown, and an UnsupportedEncodingException
 is included in the chain of nested exceptions within the
 MessagingException.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setDescription(java.lang.String)">setDescription</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>description</CODE> - content description<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - otherwise; an
                  UnsupportedEncodingException may be included
                  in the exception chain if the charset
                  conversion fails.</DL>
</DD>
</DL>
<HR>

<A NAME="setDescription(java.lang.String, java.lang.String)"><!-- --></A><H3>
setDescription</H3>
<PRE>
public void <B>setDescription</B>(java.lang.String&nbsp;description,
                           java.lang.String&nbsp;charset)
                    throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "Content-Description" header field for this body part.
 If the description parameter is <code>null</code>, then any 
 existing "Content-Description" fields are removed. <p>

 If the description contains non US-ASCII characters, it will 
 be encoded using the specified charset. If the description 
 contains only US-ASCII characters, no encoding  is done and 
 it is used as is. <p>

 Note that if the charset encoding process fails, a
 MessagingException is thrown, and an UnsupportedEncodingException
 is included in the chain of nested exceptions within the
 MessagingException.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>description</CODE> - Description<DD><CODE>charset</CODE> - Charset for encoding<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.<DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - otherwise; an
                  UnsupportedEncodingException may be included
                  in the exception chain if the charset
                  conversion fails.</DL>
</DD>
</DL>
<HR>

<A NAME="getFileName()"><!-- --></A><H3>
getFileName</H3>
<PRE>
public java.lang.String <B>getFileName</B>()
                             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the filename associated with this body part. <p>

 Returns the value of the "filename" parameter from the
 "Content-Disposition" header field of this body part. If its
 not available, returns the value of the "name" parameter from
 the "Content-Type" header field of this body part.
 Returns <code>null</code> if both are absent.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getFileName()">getFileName</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>filename</DL>
</DD>
</DL>
<HR>

<A NAME="setFileName(java.lang.String)"><!-- --></A><H3>
setFileName</H3>
<PRE>
public void <B>setFileName</B>(java.lang.String&nbsp;filename)
                 throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the filename associated with this body part, if possible. <p>

 Sets the "filename" parameter of the "Content-Disposition"
 header field of this body part.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setFileName(java.lang.String)">setFileName</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="getInputStream()"><!-- --></A><H3>
getInputStream</H3>
<PRE>
public java.io.InputStream <B>getInputStream</B>()
                                   throws java.io.IOException,
                                          <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return a decoded input stream for this body part's "content". <p>

 This implementation obtains the input stream from the DataHandler.
 That is, it invokes getDataHandler().getInputStream();<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getInputStream()">getInputStream</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an InputStream<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - this is typically thrown by the
			DataHandler. Refer to the documentation for
			javax.activation.DataHandler for more details.<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getContentStream()"><CODE>getContentStream()</CODE></A>, 
<CODE>DataHandler.getInputStream()</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getContentStream()"><!-- --></A><H3>
getContentStream</H3>
<PRE>
protected java.io.InputStream <B>getContentStream</B>()
                                        throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Produce the raw bytes of the content. This method is used
 when creating a DataHandler object for the content. Subclasses
 that can provide a separate input stream for just the Part
 content might want to override this method. <p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#content"><CODE>content</CODE></A>, 
<A HREF="../../../javax/mail/internet/MimeMessage.html#getContentStream()"><CODE>MimeMessage.getContentStream()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getRawInputStream()"><!-- --></A><H3>
getRawInputStream</H3>
<PRE>
public java.io.InputStream <B>getRawInputStream</B>()
                                      throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return an InputStream to the raw data with any Content-Transfer-Encoding
 intact.  This method is useful if the "Content-Transfer-Encoding"
 header is incorrect or corrupt, which would prevent the
 <code>getInputStream</code> method or <code>getContent</code> method
 from returning the correct data.  In such a case the application may
 use this method and attempt to decode the raw data itself. <p>

 This implementation simply calls the <code>getContentStream</code>
 method.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since: </B><DD>JavaMail 1.2</DD>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#getInputStream()"><CODE>getInputStream()</CODE></A>, 
<A HREF="../../../javax/mail/internet/MimeBodyPart.html#getContentStream()"><CODE>getContentStream()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getDataHandler()"><!-- --></A><H3>
getDataHandler</H3>
<PRE>
public javax.activation.DataHandler <B>getDataHandler</B>()
                                            throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return a DataHandler for this body part's content. <p>

 The implementation provided here works just like the
 the implementation in MimeMessage.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getDataHandler()">getDataHandler</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#getDataHandler()"><CODE>MimeMessage.getDataHandler()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getContent()"><!-- --></A><H3>
getContent</H3>
<PRE>
public java.lang.Object <B>getContent</B>()
                            throws java.io.IOException,
                                   <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return the content as a java object. The type of the object
 returned is of course dependent on the content itself. For 
 example, the native format of a text/plain content is usually
 a String object. The native format for a "multipart"
 content is always a Multipart subclass. For content types that are
 unknown to the DataHandler system, an input stream is returned
 as the content. <p>

 This implementation obtains the content from the DataHandler.
 That is, it invokes getDataHandler().getContent();<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getContent()">getContent</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Object<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - this is typically thrown by the
			DataHandler. Refer to the documentation for
			javax.activation.DataHandler for more details.</DL>
</DD>
</DL>
<HR>

<A NAME="setDataHandler(javax.activation.DataHandler)"><!-- --></A><H3>
setDataHandler</H3>
<PRE>
public void <B>setDataHandler</B>(javax.activation.DataHandler&nbsp;dh)
                    throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>This method provides the mechanism to set this body part's content.
 The given DataHandler object should wrap the actual content.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setDataHandler(javax.activation.DataHandler)">setDataHandler</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dh</CODE> - The DataHandler for the content<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
 			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="setContent(java.lang.Object, java.lang.String)"><!-- --></A><H3>
setContent</H3>
<PRE>
public void <B>setContent</B>(java.lang.Object&nbsp;o,
                       java.lang.String&nbsp;type)
                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>A convenience method for setting this body part's content. <p>

 The content is wrapped in a DataHandler object. Note that a
 DataContentHandler class for the specified type should be
 available to the JavaMail implementation for this to work right.
 That is, to do <code>setContent(foobar, "application/x-foobar")</code>,
 a DataContentHandler for "application/x-foobar" should be installed.
 Refer to the Java Activation Framework for more information.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setContent(java.lang.Object, java.lang.String)">setContent</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the content object<DD><CODE>type</CODE> - Mime type of the object<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification of
			existing values<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="setText(java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
public void <B>setText</B>(java.lang.String&nbsp;text)
             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Convenience method that sets the given String as this
 part's content, with a MIME type of "text/plain". If the
 string contains non US-ASCII characters, it will be encoded
 using the platform's default charset. The charset is also
 used to set the "charset" parameter. <p>

 Note that there may be a performance penalty if
 <code>text</code> is large, since this method may have
 to scan all the characters to determine what charset to
 use. <p>
 If the charset is already known, use the
 setText() version that takes the charset parameter.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String)">setText</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeBodyPart.html#setText(java.lang.String, java.lang.String)"><CODE>setText(String text, String charset)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setText(java.lang.String, java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
public void <B>setText</B>(java.lang.String&nbsp;text,
                    java.lang.String&nbsp;charset)
             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Convenience method that sets the given String as this part's
 content, with a MIME type of "text/plain" and the specified
 charset. The given Unicode string will be charset-encoded
 using the specified charset. The charset is also used to set
 the "charset" parameter.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String, java.lang.String)">setText</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setContent(javax.mail.Multipart)"><!-- --></A><H3>
setContent</H3>
<PRE>
public void <B>setContent</B>(<A HREF="../../../javax/mail/Multipart.html">Multipart</A>&nbsp;mp)
                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>This method sets the body part's content to a Multipart object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setContent(javax.mail.Multipart)">setContent</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mp</CODE> - The multipart object that is the Message's content<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification of
			existing values.<DD><CODE>IllegalStateException</CODE> - if this body part is
			obtained from a READ_ONLY folder.</DL>
</DD>
</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>Output the body part as an RFC 822 format stream.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#writeTo(java.io.OutputStream)">writeTo</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - if an error occurs writing to the
				stream or if an error is generated
				by the javax.activation layer.<DT><B>See Also: </B><DD><CODE>DataHandler.writeTo(java.io.OutputStream)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getHeader(java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
public java.lang.String[] <B>getHeader</B>(java.lang.String&nbsp;name)
                             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get all the headers for this header_name. Note that certain
 headers may be encoded as per RFC 2047 if they contain
 non US-ASCII characters and these should be decoded.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getHeader(java.lang.String)">getHeader</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of header<DT><B>Returns:</B><DD>array of headers<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html"><CODE>MimeUtility</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
public java.lang.String <B>getHeader</B>(java.lang.String&nbsp;name,
                                  java.lang.String&nbsp;delimiter)
                           throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get all the headers for this header name, returned as a single
 String, with headers separated by the delimiter. If the
 delimiter is <code>null</code>, only the first header is 
 returned.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getHeader(java.lang.String, java.lang.String)">getHeader</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of this header<DD><CODE>delimiter</CODE> - delimiter between fields in returned string<DT><B>Returns:</B><DD>the value fields for all headers with 
				this name<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="setHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
setHeader</H3>
<PRE>
public void <B>setHeader</B>(java.lang.String&nbsp;name,
                      java.lang.String&nbsp;value)
               throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the value for this header_name. Replaces all existing
 header values with this new value. Note that RFC 822 headers
 must contain only US-ASCII characters, so a header that
 contains non US-ASCII characters must be encoded as per the
 rules of RFC 2047.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#setHeader(java.lang.String, java.lang.String)">setHeader</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - header name<DD><CODE>value</CODE> - header value<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html"><CODE>MimeUtility</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
addHeader</H3>
<PRE>
public void <B>addHeader</B>(java.lang.String&nbsp;name,
                      java.lang.String&nbsp;value)
               throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Add this value to the existing values for this header_name.
 Note that RFC 822 headers must contain only US-ASCII
 characters, so a header that contains non US-ASCII characters
 must be encoded as per the rules of RFC 2047.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#addHeader(java.lang.String, java.lang.String)">addHeader</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - header name<DD><CODE>value</CODE> - header value<DT><B>See Also: </B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html"><CODE>MimeUtility</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeHeader(java.lang.String)"><!-- --></A><H3>
removeHeader</H3>
<PRE>
public void <B>removeHeader</B>(java.lang.String&nbsp;name)
                  throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Remove all headers with this name.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#removeHeader(java.lang.String)">removeHeader</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.Part</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>header_name</CODE> - the name of this header<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<DD><CODE>IllegalStateException</CODE> - if this Part is 
				obtained from a READ_ONLY folder</DL>
</DD>
</DL>
<HR>

<A NAME="getAllHeaders()"><!-- --></A><H3>
getAllHeaders</H3>
<PRE>
public java.util.Enumeration <B>getAllHeaders</B>()
                                    throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return all the headers from this Message as an Enumeration of
 Header objects.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getAllHeaders()">getAllHeaders</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.Part</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>enumeration of Header objects<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="getMatchingHeaders(java.lang.String[])"><!-- --></A><H3>
getMatchingHeaders</H3>
<PRE>
public java.util.Enumeration <B>getMatchingHeaders</B>(java.lang.String[]&nbsp;names)
                                         throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return matching headers from this Message as an Enumeration of
 Header objects. <p><DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getMatchingHeaders(java.lang.String[])">getMatchingHeaders</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.Part</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>enumeration of Header objects<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="getNonMatchingHeaders(java.lang.String[])"><!-- --></A><H3>
getNonMatchingHeaders</H3>
<PRE>
public java.util.Enumeration <B>getNonMatchingHeaders</B>(java.lang.String[]&nbsp;names)
                                            throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Return non-matching headers from this Message as an
 Enumeration of Header objects.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/Part.html#getNonMatchingHeaders(java.lang.String[])">getNonMatchingHeaders</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html">Part</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.Part</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>enumeration of Header objects<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></CODE> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="addHeaderLine(java.lang.String)"><!-- --></A><H3>
addHeaderLine</H3>
<PRE>
public void <B>addHeaderLine</B>(java.lang.String&nbsp;line)
                   throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Add a header line to this body part<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#addHeaderLine(java.lang.String)">addHeaderLine</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.mail.internet.MimePart</CODE></DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html">IllegalWriteException</A></CODE> - if the underlying
			implementation does not support modification<DD><CODE>IllegalStateException</CODE> - if this Part is
			obtained from a READ_ONLY folder</DL>
</DD>
</DL>
<HR>

<A NAME="getAllHeaderLines()"><!-- --></A><H3>
getAllHeaderLines</H3>
<PRE>
public java.util.Enumeration <B>getAllHeaderLines</B>()
                                        throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get all header lines as an Enumeration of Strings. A Header
 line is a raw RFC 822 header line, containing both the "name"
 and "value" field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getAllHeaderLines()">getAllHeaderLines</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
getMatchingHeaderLines</H3>
<PRE>
public java.util.Enumeration <B>getMatchingHeaderLines</B>(java.lang.String[]&nbsp;names)
                                             throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get matching header lines as an Enumeration of Strings.
 A Header line is a raw RFC 822 header line, containing both
 the "name" and "value" field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getMatchingHeaderLines(java.lang.String[])">getMatchingHeaderLines</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getNonMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
getNonMatchingHeaderLines</H3>
<PRE>
public java.util.Enumeration <B>getNonMatchingHeaderLines</B>(java.lang.String[]&nbsp;names)
                                                throws <A HREF="../../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get non-matching header lines as an Enumeration of Strings.
 A Header line is a raw RFC 822 header line, containing both
 the "name"  and "value" field.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/mail/internet/MimePart.html#getNonMatchingHeaderLines(java.lang.String[])">getNonMatchingHeaderLines</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/MimePart.html">MimePart</A></CODE></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>Examine the content of this body part and update the appropriate
 MIME headers.  Typical headers that get set here are
 <code>Content-Type</code> and <code>Content-Transfer-Encoding</code>.
 Headers might need to be updated in two cases:

 <br>
 - A message being crafted by a mail application will certainly
 need to activate this method at some point to fill up its internal
 headers.

 <br>
 - A message read in from a Store will have obtained
 all its headers from the store, and so doesn't need this.
 However, if this message is editable and if any edits have
 been made to either the content or message structure, we might
 need to resync our headers.

 <br>
 In both cases this method is typically called by the
 <code>Message.saveChanges</code> method.<DD><DL>
</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/MimeBodyPart.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/MailDateFormat.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.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="MimeBodyPart.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>
