<!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">
MimePart (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="MimePart (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/MimePart.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/MimeMultipart.html" title="class in javax.mail.internet"><
B>PREV CLASS<
/B><
/A>
<
A HREF="../../../javax/mail/internet/MimePartDataSource.html" title="class 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/MimePart.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="MimePart.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 | FIELD | CONSTR | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <
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>
<
DT><
B>All Superinterfaces:<
/B> <
DD><
A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part<
/A><
/DD>
<
DT><
B>All Known Implementing Classes:<
/B> <
DD><
A HREF="../../../com/sun/mail/imap/IMAPMessage.html" title="class in com.sun.mail.imap">IMAPMessage<
/A>, <
A HREF="../../../com/sun/mail/dsn/MessageHeaders.html" title="class in com.sun.mail.dsn">MessageHeaders<
/A>, <
A HREF="../../../javax/mail/internet/MimeBodyPart.html" title="class in javax.mail.internet">MimeBodyPart<
/A>, <
A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage<
/A>, <
A HREF="../../../com/sun/mail/pop3/POP3Message.html" title="class in com.sun.mail.pop3">POP3Message<
/A>, <
A HREF="../../../javax/mail/internet/PreencodedMimeBodyPart.html" title="class in javax.mail.internet">PreencodedMimeBodyPart<
/A>, <
A HREF="../../../com/sun/mail/smtp/SMTPMessage.html" title="class in com.sun.mail.smtp">SMTPMessage<
/A><
/DD>
<
DT><
PRE>public interface <
B>MimePart<
/B><
DT>extends <
A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part<
/A><
/DL>
The MimePart interface models an <
strong>Entity<
/strong> as defined
by MIME
(RFC2045, Section
2.4). <
p>
MimePart extends the Part interface to add additional RFC822 and MIME
specific semantics and attributes. It provides the base interface for
the MimeMessage and MimeBodyPart classes
RFC822 and MIME header fields <
strong>must<
/strong> contain only
US-ASCII characters. If a header contains non US-ASCII characters,
it must be encoded as per the rules in RFC 2047. The MimeUtility
class provided in this package can be used to to achieve this.
<
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>
<
DT><
B>See Also:<
/B><
DD><
A HREF="../../../javax/mail/internet/MimeUtility.html" title="class in javax.mail.internet"><
CODE>MimeUtility<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Part.html" title="interface in javax.mail"><
CODE>Part<
/CODE><
/A><
/DL>
<!-- =========== 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">
<
A NAME="fields_inherited_from_class_javax.mail.Part"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<
TH ALIGN="left"><
B>Fields inherited from interface javax.mail.<
A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part<
/A><
/B><
/TH>
<
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>
<!-- ========== 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">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#addHeaderLine(java.lang.String)">addHeaderLine<
/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> line
)<
/CODE>
Add a raw RFC822 header-line.<
/TD>
<
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/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#getAllHeaderLines()">getAllHeaderLines<
/A><
/B>
()<
/CODE>
Get all header lines as an Enumeration of Strings.<
/TD>
<
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/MimePart.html#getContentID()">getContentID<
/A><
/B>
()<
/CODE>
Get the Content-
ID of this part.<
/TD>
<
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/MimePart.html#getContentLanguage()">getContentLanguage<
/A><
/B>
()<
/CODE>
Get the language tags specified in the Content-Language header
<
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/MimePart.html#getContentMD5()">getContentMD5<
/A><
/B>
()<
/CODE>
Get the Content-MD5 digest of this part.<
/TD>
<
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/MimePart.html#getEncoding()">getEncoding<
/A><
/B>
()<
/CODE>
Get the transfer encoding of this part.<
/TD>
<
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/MimePart.html#getHeader(java.lang.String, java.lang.String)">getHeader<
/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>
name,
<
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> delimiter
)<
/CODE>
Get the values of all header fields available for this header,
returned as a single String, with the values separated by the
<
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/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#getMatchingHeaderLines(java.lang.String[])">getMatchingHeaderLines<
/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>
[] names
)<
/CODE>
Get matching header lines as an Enumeration of Strings.<
/TD>
<
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/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#getNonMatchingHeaderLines(java.lang.String[])">getNonMatchingHeaderLines<
/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>
[] names
)<
/CODE>
Get non-matching header lines as an Enumeration of Strings.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#setContentLanguage(java.lang.String[])">setContentLanguage<
/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>
[] languages
)<
/CODE>
Set the Content-
Language header of this MimePart.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#setContentMD5(java.lang.String)">setContentMD5<
/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> md5
)<
/CODE>
Set the Content-MD5 of this part.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String)">setText<
/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>
text)<
/CODE>
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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String, java.lang.String)">setText</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> text,
<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> charset)</CODE>
<BR>
Convenience method that sets the given String as this part's
content, with a MIME type of "text/plain" and the specified
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String, java.lang.String, java.lang.String)">setText<
/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>
text,
<
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>
charset,
<
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>
Convenience method that sets the given String as this part's
content, with a primary MIME type of "text" and the specified
MIME subtype.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.mail.Part"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.mail.<A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/Part.html#addHeader(java.lang.String, java.lang.String)">addHeader</A>, <A HREF="../../../javax/mail/Part.html#getAllHeaders()">getAllHeaders</A>, <A HREF="../../../javax/mail/Part.html#getContent()">getContent</A>, <A HREF="../../../javax/mail/Part.html#getContentType()">getContentType</A>, <A HREF="../../../javax/mail/Part.html#getDataHandler()">getDataHandler</A>, <A HREF="../../../javax/mail/Part.html#getDescription()">getDescription</A>, <A HREF="../../../javax/mail/Part.html#getDisposition()">getDisposition</A>, <A HREF="../../../javax/mail/Part.html#getFileName()">getFileName</A>, <A HREF="../../../javax/mail/Part.html#getHeader(java.lang.String)">getHeader</A>, <A HREF="../../../javax/mail/Part.html#getInputStream()">getInputStream</A>, <A HREF="../../../javax/mail/Part.html#getLineCount()">getLineCount</A>, <A HREF="../../../javax/mail/Part.html#getMatchingHeaders(java.lang.String[])">getMatchingHeaders</A>, <A HREF="../../../javax/mail/Part.html#getNonMatchingHeaders(java.lang.String[])">getNonMatchingHeaders</A>, <A HREF="../../../javax/mail/Part.html#getSize()">getSize</A>, <A HREF="../../../javax/mail/Part.html#isMimeType(java.lang.String)">isMimeType</A>, <A HREF="../../../javax/mail/Part.html#removeHeader(java.lang.String)">removeHeader</A>, <A HREF="../../../javax/mail/Part.html#setContent(javax.mail.Multipart)">setContent</A>, <A HREF="../../../javax/mail/Part.html#setContent(java.lang.Object, java.lang.String)">setContent</A>, <A HREF="../../../javax/mail/Part.html#setDataHandler(javax.activation.DataHandler)">setDataHandler</A>, <A HREF="../../../javax/mail/Part.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../../javax/mail/Part.html#setDisposition(java.lang.String)">setDisposition</A>, <A HREF="../../../javax/mail/Part.html#setFileName(java.lang.String)">setFileName</A>, <A HREF="../../../javax/mail/Part.html#setHeader(java.lang.String, java.lang.String)">setHeader</A>, <A HREF="../../../javax/mail/Part.html#writeTo(java.io.OutputStream)">writeTo</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ 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="getHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
<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>getHeader</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> name,
<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> delimiter)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the values of all header fields available for this header,
returned as a single String, with the values separated by the
delimiter. If the delimiter is <code>null</code>, only the
first value is returned.
<P>
<DD><DL>
</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" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="addHeaderLine(java.lang.String)"><!-- --></A><H3>
addHeaderLine</H3>
<PRE>
void <B>addHeaderLine</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> line)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Add a raw RFC822 header-line.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
implementation does not support modification
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Part is
obtained from a READ_ONLY folder
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getAllHeaderLines()"><!-- --></A><H3>
getAllHeaderLines</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</A> <B>getAllHeaderLines</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get all header lines as an Enumeration of Strings. A Header
line is a raw RFC822 header-line, containing both the "name"
and "value" field.
<P>
<DD><DL>
</DL>
</DD>
<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="getMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
getMatchingHeaderLines</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</A> <B>getMatchingHeaderLines</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>[] names)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get matching header lines as an Enumeration of Strings.
A Header line is a raw RFC822 header-line, containing both
the "name" and "value" field.
<P>
<DD><DL>
</DL>
</DD>
<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="getNonMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
getNonMatchingHeaderLines</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</A> <B>getNonMatchingHeaderLines</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>[] names)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get non-matching header lines as an Enumeration of Strings.
A Header line is a raw RFC822 header-line, containing both
the "name" and "value" field.
<P>
<DD><DL>
</DL>
</DD>
<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="getEncoding()"><!-- --></A><H3>
getEncoding</H3>
<PRE>
<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>getEncoding</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the transfer encoding of this part.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>content-transfer-encoding
<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="getContentID()"><!-- --></A><H3>
getContentID</H3>
<PRE>
<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>getContentID</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the Content-ID of this part. Returns null if none present.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>content-ID
<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="getContentMD5()"><!-- --></A><H3>
getContentMD5</H3>
<PRE>
<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>getContentMD5</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the Content-MD5 digest of this part. Returns null if
none present.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>content-MD5
<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="setContentMD5(java.lang.String)"><!-- --></A><H3>
setContentMD5</H3>
<PRE>
void <B>setContentMD5</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> md5)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the Content-MD5 of this part.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>md5</CODE> - the MD5 value
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
implementation does not support modification
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Part is
obtained from a READ_ONLY folder
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getContentLanguage()"><!-- --></A><H3>
getContentLanguage</H3>
<PRE>
<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>getContentLanguage</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the language tags 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.
<P>
<DD><DL>
</DL>
</DD>
<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="setContentLanguage(java.lang.String[])"><!-- --></A><H3>
setContentLanguage</H3>
<PRE>
void <B>setContentLanguage</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>[] languages)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the Content-Language header of this MimePart. The
Content-Language header is defined by RFC1766.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>languages</CODE> - array of language tags
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
implementation does not support modification
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this Part is
obtained from a READ_ONLY folder
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setText(java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
void <B>setText</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> text)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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
<code>setText</code> method that takes the charset parameter.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Part.html#setText(java.lang.String)">setText</A></CODE> in interface <CODE><A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text content to set
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if an error occurs<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimePart.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>
void <B>setText</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> text,
<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> charset)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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
"charset" parameter.
<
DT><
B>Parameters:<
/B><
DD><
CODE>text<
/CODE> - the
text content to set<
DD><
CODE>charset<
/CODE> - the
charset to use
for the
text
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE> - if an error occurs<
/DL>
<
A NAME="setText(java.lang.String, java.lang.String, java.lang.String)"><!-- --><
/A><
H3>
void <
B>setText<
/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>
text,
<
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>
charset,
<
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>
<
DD>Convenience
method that sets the given String as this part
's
content, with a primary MIME type of "text" and the specified
MIME subtype. The given Unicode string will be charset-encoded
using the specified charset. The charset is also used to set
the "charset" parameter.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text content to set<DD><CODE>charset</CODE> - the charset to use for the text<DD><CODE>subtype</CODE> - the MIME subtype to use (e.g., "html")
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if an error occurs<DT><B>Since:</B></DT>
<DD>JavaMail 1.4</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/MimePart.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/MimeMultipart.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>
<A HREF="../../../javax/mail/internet/MimePartDataSource.html" title="class 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/MimePart.html" target="_top"><B>FRAMES</B></A>
<A HREF="MimePart.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <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>