<!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">
MimeMessage (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="MimeMessage (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/MimeMessage.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/MimeBodyPart.html" title="class in javax.mail.internet"><
B>PREV CLASS<
/B><
/A>
<
A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.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/MimeMessage.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="MimeMessage.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: <
A HREF="#nested_class_summary">NESTED<
/A> | <
A HREF="#field_summary">FIELD<
/A> | <
A HREF="#constructor_summary">CONSTR<
/A> | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: <
A HREF="#field_detail">FIELD<
/A> | <
A HREF="#constructor_detail">CONSTR<
/A> | <
A HREF="#method_detail">METHOD<
/A><
/FONT><
/TD>
<
A NAME="skip-navbar_top"><
/A>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
javax.mail.internet<
/FONT>
<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.
lang.Object<
/A>
<
IMG SRC="../../../resources/inherit.gif" ALT="extended by "><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">javax.mail.Message<
/A>
<
IMG SRC="../../../resources/inherit.gif" ALT="extended by "><
B>javax.mail.internet.MimeMessage<
/B>
<
DT><
B>All Implemented Interfaces:<
/B> <
DD><
A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart<
/A>, <
A HREF="../../../javax/mail/Part.html" title="interface in javax.mail">Part<
/A><
/DD>
<
DT><
B>Direct Known Subclasses:<
/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="../../../com/sun/mail/pop3/POP3Message.html" title="class in com.sun.mail.pop3">POP3Message<
/A>, <
A HREF="../../../com/sun/mail/smtp/SMTPMessage.html" title="class in com.sun.mail.smtp">SMTPMessage<
/A><
/DD>
<
DT><
PRE>public
class <
B>MimeMessage<
/B><
DT>extends <
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
DT>implements <
A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart<
/A><
/DL>
This class represents a MIME style email message. It implements
Clients wanting to create new MIME style messages will instantiate
an empty MimeMessage object and then fill it with appropriate
attributes and
content. <
p>
Service providers that implement MIME compliant backend stores may
want to subclass MimeMessage and override certain methods to provide
specific implementations. The simplest case is probably a provider
that generates a MIME style input stream and leaves the parsing of
the stream to this
class. <
p>
MimeMessage uses the <
code>InternetHeaders<
/code>
class to parse and
store the top level RFC
822 headers of a message. <
p>
The <
code>mail.mime.address.strict<
/code> session property controls
the parsing of address headers. By default, strict parsing of address
headers is done. If this property is set to <
code>
"false"<
/code>,
strict parsing is not done and many illegal addresses that sometimes
occur in real messages are allowed. See the <
code>InternetAddress<
/code>
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.
<
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>,
<
A HREF="../../../javax/mail/Message.html" title="class in javax.mail"><
CODE>Message<
/CODE><
/A>,
<
A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet"><
CODE>MimePart<
/CODE><
/A>,
<
A HREF="../../../javax/mail/internet/InternetAddress.html" title="class in javax.mail.internet"><
CODE>InternetAddress<
/CODE><
/A><
/DL>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<
A NAME="nested_class_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/MimeMessage.RecipientType.html" title="class in javax.mail.internet">MimeMessage.RecipientType<
/A><
/B><
/CODE>
This inner class extends the javax.mail.Message.RecipientType
class to add additional RecipientTypes.<
/TD>
<!-- =========== 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">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#content">content<
/A><
/B><
/CODE>
Byte array that holds the bytes of this Message's content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#contentStream">contentStream</A></B></CODE>
<BR>
If the data for this message was supplied by an
InputStream that implements the SharedInputStream interface,
<code>contentStream</code> is another such stream representing
the content of this message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation">DataHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#dh">dh</A></B></CODE>
<BR>
The DataHandler object representing this Message's
content.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE>protected <
A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#flags">flags<
/A><
/B><
/CODE>
The Flags
for this message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE>protected <
A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#headers">headers<
/A><
/B><
/CODE>
The InternetHeaders object that stores the header
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#modified">modified<
/A><
/B><
/CODE>
A flag indicating whether the message has been modified.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#saved">saved<
/A><
/B><
/CODE>
Does the <
code>saveChanges<
/code>
method need to be called on
this message? This flag is set to false by the public constructor
and set to true by the <
code>saveChanges<
/code>
method.<
/TD>
<
A NAME="fields_inherited_from_class_javax.mail.Message"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<
TH ALIGN="left"><
B>Fields inherited from
class javax.mail.<
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/B><
/TH>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD><
CODE><
A HREF="../../../javax/mail/Message.html#expunged">expunged<
/A>, <
A HREF="../../../javax/mail/Message.html#folder">folder<
/A>, <
A HREF="../../../javax/mail/Message.html#msgnum">msgnum<
/A>, <
A HREF="../../../javax/mail/Message.html#session">session<
/A><
/CODE><
/TD>
<
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>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<
A NAME="constructor_summary"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.Folder, java.io.InputStream, int)">MimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder<
/A> folder,
<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A> is,
Constructs a MimeMessage by reading and parsing the data from the
specified MIME InputStream.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.Folder, int)">MimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder<
/A> folder,
Constructs an empty MimeMessage object with the given Folder
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.Folder, javax.mail.internet.InternetHeaders, byte[], int)">MimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder<
/A> folder,
<
A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders<
/A>
headers,
byte[] content,
Constructs a MimeMessage from the given InternetHeaders object
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.internet.MimeMessage)">MimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage<
/A> source
)<
/CODE>
Constructs a new MimeMessage with content initialized from the
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.Session)">MimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session<
/A> session
)<
/CODE>
Default constructor.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#MimeMessage(javax.mail.Session, java.io.InputStream)">MimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session<
/A> session,
<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A> is
)<
/CODE>
Constructs a MimeMessage by reading and parsing the data from the
specified MIME InputStream.<
/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/MimeMessage.html#addFrom(javax.mail.Address[])">addFrom<
/A><
/B>
(<
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)<
/CODE>
Add the specified addresses to the existing
"From" field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#addHeader(java.lang.String, java.lang.String)">addHeader<
/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>
value)<
/CODE>
Add this
value to the existing values
for this header_name.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.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 RFC
822 header-line.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])">addRecipients<
/A><
/B>
(<
A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType<
/A>
type,
<
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)<
/CODE>
Add the given addresses to the specified recipient
type.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#addRecipients(javax.mail.Message.RecipientType, java.lang.String)">addRecipients<
/A><
/B>
(<
A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType<
/A>
type,
<
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> addresses
)<
/CODE>
Add the given addresses to the specified recipient
type.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE>protected <
A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#createInternetHeaders(java.io.InputStream)">createInternetHeaders<
/A><
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A> is
)<
/CODE>
Create and return an InternetHeaders object that loads the
headers from the given InputStream.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE>protected <
A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#createMimeMessage(javax.mail.Session)">createMimeMessage<
/A><
/B>
(<
A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session<
/A> session
)<
/CODE>
Create and return a MimeMessage
object.<
/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/MimeMessage.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/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/MimeMessage.html#getAllHeaders()">getAllHeaders<
/A><
/B>
()<
/CODE>
Return all the headers from this Message as an enumeration
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE> <
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[]<
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getAllRecipients()">getAllRecipients<
/A><
/B>
()<
/CODE>
Get all the recipient addresses
for the message.<
/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/Object.html?is-external=true" title="class or interface in java.lang">Object<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getContent()">getContent<
/A><
/B>
()<
/CODE>
Return the
content as a Java
object.<
/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/MimeMessage.html#getContentID()">getContentID<
/A><
/B>
()<
/CODE>
Returns the
value of the
"Content-ID" header field.<
/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/MimeMessage.html#getContentLanguage()">getContentLanguage<
/A><
/B>
()<
/CODE>
Get the languages specified in the "Content-Language" header
field of this message.<
/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/MimeMessage.html#getContentMD5()">getContentMD5<
/A><
/B>
()<
/CODE>
Return the
value of the
"Content-MD5" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE>protected <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getContentStream()">getContentStream<
/A><
/B>
()<
/CODE>
Produce the raw bytes of the
content.<
/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/MimeMessage.html#getContentType()">getContentType<
/A><
/B>
()<
/CODE>
Returns the
value of the RFC
822 "Content-Type" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE> <
A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation">DataHandler<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getDataHandler()">getDataHandler<
/A><
/B>
()<
/CODE>
Return a DataHandler for this Message's content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getDescription()">getDescription</A></B>()</CODE>
<BR>
Returns the "Content-Description" header field of this Message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getDisposition()">getDisposition</A></B>()</CODE>
<BR>
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> <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/MimeMessage.html#getEncoding()">getEncoding</A></B>()</CODE>
<BR>
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> <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/MimeMessage.html#getFileName()">getFileName</A></B>()</CODE>
<BR>
Get the filename associated with this Message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getFlags()">getFlags</A></B>()</CODE>
<BR>
Return a <code>Flags</code> object containing the flags for
this message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getFrom()">getFrom</A></B>()</CODE>
<BR>
Returns the value of the RFC 822 "From" header fields.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getHeader(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)</CODE>
<BR>
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> <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/MimeMessage.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>
<BR>
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> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getInputStream()">getInputStream</A></B>()</CODE>
<BR>
Return a decoded input stream for this Message's
"content".<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getLineCount()">getLineCount<
/A><
/B>
()<
/CODE>
Return the number of lines
for the
content of this message.<
/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/MimeMessage.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/MimeMessage.html#getMatchingHeaders(java.lang.String[])">getMatchingHeaders<
/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>
Return matching headers from this Message as an Enumeration of
<
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/MimeMessage.html#getMessageID()">getMessageID<
/A><
/B>
()<
/CODE>
Returns the
value of the
"Message-ID" header field.<
/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/MimeMessage.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">
<
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/MimeMessage.html#getNonMatchingHeaders(java.lang.String[])">getNonMatchingHeaders<
/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>
Return non-matching headers from this Message as an
Enumeration of Header objects.<
/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/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getRawInputStream()">getRawInputStream<
/A><
/B>
()<
/CODE>
Return an InputStream to the raw data with any Content-Transfer-Encoding
<
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/Date.html?is-external=true" title="class or interface in java.util">Date<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getReceivedDate()">getReceivedDate<
/A><
/B>
()<
/CODE>
Returns the Date on this message was received.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE> <
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[]<
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getRecipients(javax.mail.Message.RecipientType)">getRecipients<
/A><
/B>
(<
A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType<
/A>
type)<
/CODE>
Returns the recepients specified by the
type.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE> <
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[]<
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getReplyTo()">getReplyTo<
/A><
/B>
()<
/CODE>
Return the
value of the RFC
822 "Reply-To" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE> <
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getSender()">getSender<
/A><
/B>
()<
/CODE>
Returns the
value of the RFC
822 "Sender" header field.<
/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/Date.html?is-external=true" title="class or interface in java.util">Date<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getSentDate()">getSentDate<
/A><
/B>
()<
/CODE>
Returns the
value of the RFC
822 "Date" field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#getSize()">getSize<
/A><
/B>
()<
/CODE>
Return the
size of the
content of this message in bytes.<
/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/MimeMessage.html#getSubject()">getSubject<
/A><
/B>
()<
/CODE>
Returns the
value of the
"Subject" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#isMimeType(java.lang.String)">isMimeType<
/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> mimeType
)<
/CODE>
Is this Part of the specified MIME type? This method
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#isSet(javax.mail.Flags.Flag)">isSet<
/A><
/B>
(<
A HREF="../../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag<
/A> flag
)<
/CODE>
Check whether the flag specified in the <
code>flag<
/code>
argument is set in this message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#parse(java.io.InputStream)">parse<
/A><
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A> is
)<
/CODE>
Parse the InputStream setting the <
code>headers<
/code> and
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#removeHeader(java.lang.String)">removeHeader<
/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)<
/CODE>
Remove all
headers with this
name.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
CODE> <
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/FONT><
/TD>
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#reply(boolean)">reply<
/A><
/B>
(boolean replyToAll
)<
/CODE>
Get a new Message suitable
for a reply to this message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#saveChanges()">saveChanges<
/A><
/B>
()<
/CODE>
Updates the appropriate header fields of this message to be
consistent with the message's contents.</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/MimeMessage.html#setContent(javax.mail.Multipart)">setContent</A></B>(<A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A> mp)</CODE>
<BR>
This method sets the Message's
content to a Multipart
object.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setContent(java.lang.Object, java.lang.String)">setContent<
/A><
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object<
/A> o,
<
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>
type)<
/CODE>
A convenience method for setting this Message's content.</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/MimeMessage.html#setContentID(java.lang.String)">setContentID</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> cid)</CODE>
<BR>
Set the "Content-ID" header field of this Message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.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>
<BR>
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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.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>
<BR>
Set the "Content-MD5" header field of this Message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#setDataHandler(javax.activation.DataHandler)">setDataHandler</A></B>(<A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation">DataHandler</A> dh)</CODE>
<BR>
This method provides the mechanism to set this part's
content.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setDescription(java.lang.String)">setDescription<
/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> description
)<
/CODE>
Set the
"Content-Description" header field
for this Message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setDescription(java.lang.String, java.lang.String)">setDescription<
/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> description,
<
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>
Set the
"Content-Description" header field
for this Message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setDisposition(java.lang.String)">setDisposition<
/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> disposition
)<
/CODE>
Set the
"Content-Disposition" header field of this Message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setFileName(java.lang.String)">setFileName<
/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> filename
)<
/CODE>
Set the filename associated with this part, if possible.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setFlags(javax.mail.Flags, boolean)">setFlags<
/A><
/B>
(<
A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags<
/A> flag,
Set the flags
for this message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setFrom()">setFrom<
/A><
/B>
()<
/CODE>
Set the RFC 822 "From" header field using the value of the
<
code>InternetAddress.getLocalAddress<
/code>
method.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setFrom(javax.mail.Address)">setFrom<
/A><
/B>
(<
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A> address
)<
/CODE>
Set the RFC
822 "From" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setHeader(java.lang.String, java.lang.String)">setHeader<
/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>
value)<
/CODE>
Set the
value for this header_name.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])">setRecipients<
/A><
/B>
(<
A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType<
/A>
type,
<
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)<
/CODE>
Set the specified recipient
type to the given addresses.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setRecipients(javax.mail.Message.RecipientType, java.lang.String)">setRecipients<
/A><
/B>
(<
A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType<
/A>
type,
<
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> addresses
)<
/CODE>
Set the specified recipient
type to the given addresses.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setReplyTo(javax.mail.Address[])">setReplyTo<
/A><
/B>
(<
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)<
/CODE>
Set the RFC
822 "Reply-To" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setSender(javax.mail.Address)">setSender<
/A><
/B>
(<
A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address<
/A> address
)<
/CODE>
Set the RFC
822 "Sender" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setSentDate(java.util.Date)">setSentDate<
/A><
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date<
/A> d
)<
/CODE>
Set the RFC
822 "Date" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setSubject(java.lang.String)">setSubject<
/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> subject
)<
/CODE>
Set the
"Subject" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.html#setSubject(java.lang.String, java.lang.String)">setSubject<
/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> subject,
<
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>
Set the
"Subject" header field.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../javax/mail/internet/MimeMessage.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/MimeMessage.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/MimeMessage.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>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#updateHeaders()">updateHeaders</A></B>()</CODE>
<BR>
Called by the <code>saveChanges</code> method to actually
update the MIME headers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#updateMessageID()">updateMessageID</A></B>()</CODE>
<BR>
Update the Message-ID header.</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/MimeMessage.html#writeTo(java.io.OutputStream)">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os)</CODE>
<BR>
Output the message as an RFC 822 format stream.</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/MimeMessage.html#writeTo(java.io.OutputStream, java.lang.String[])">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os,
<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>[] ignoreList)</CODE>
<BR>
Output the message as an RFC 822 format stream, without
specified headers.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.mail.Message"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class javax.mail.<A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/mail/Message.html#addRecipient(javax.mail.Message.RecipientType, javax.mail.Address)">addRecipient</A>, <A HREF="../../../javax/mail/Message.html#getFolder()">getFolder</A>, <A HREF="../../../javax/mail/Message.html#getMessageNumber()">getMessageNumber</A>, <A HREF="../../../javax/mail/Message.html#isExpunged()">isExpunged</A>, <A HREF="../../../javax/mail/Message.html#match(javax.mail.search.SearchTerm)">match</A>, <A HREF="../../../javax/mail/Message.html#setExpunged(boolean)">setExpunged</A>, <A HREF="../../../javax/mail/Message.html#setFlag(javax.mail.Flags.Flag, boolean)">setFlag</A>, <A HREF="../../../javax/mail/Message.html#setMessageNumber(int)">setMessageNumber</A>, <A HREF="../../../javax/mail/Message.html#setRecipient(javax.mail.Message.RecipientType, javax.mail.Address)">setRecipient</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="dh"><!-- --></A><H3>
dh</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation">DataHandler</A> <B>dh</B></PRE>
<DL>
<DD>The DataHandler object representing this Message's content.
<
A NAME="content"><!-- --><
/A><
H3>
protected byte
[] <
B>content<
/B><
/PRE>
<
DD>Byte array that holds the bytes of this Message
's content.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="contentStream"><!-- --></A><H3>
contentStream</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> <B>contentStream</B></PRE>
<DL>
<DD>If the data for this message was supplied by an
InputStream that implements the SharedInputStream interface,
<code>contentStream</code> is another such stream representing
the content of this message. In this case, <code>content</code>
will be null.
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DL>
<HR>
<A NAME="headers"><!-- --></A><H3>
headers</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A> <B>headers</B></PRE>
<DL>
<DD>The InternetHeaders object that stores the header
of this message.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="flags"><!-- --></A><H3>
flags</H3>
<PRE>
protected <A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>flags</B></PRE>
<DL>
<DD>The Flags for this message.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="modified"><!-- --></A><H3>
modified</H3>
<PRE>
protected boolean <B>modified</B></PRE>
<DL>
<DD>A flag indicating whether the message has been modified.
If the message has not been modified, any data in the
<code>content</code> array is assumed to be valid and is used
directly in the <code>writeTo</code> method. This flag is
set to true when an empty message is created or when the
<code>saveChanges</code> method is called.
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DL>
<HR>
<A NAME="saved"><!-- --></A><H3>
saved</H3>
<PRE>
protected boolean <B>saved</B></PRE>
<DL>
<DD>Does the <code>saveChanges</code> method need to be called on
this message? This flag is set to false by the public constructor
and set to true by the <code>saveChanges</code> method. The
<code>writeTo</code> method checks this flag and calls the
<code>saveChanges</code> method as necessary. This avoids the
common mistake of forgetting to call the <code>saveChanges</code>
method on a newly constructed message.
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="MimeMessage(javax.mail.Session)"><!-- --></A><H3>
MimeMessage</H3>
<PRE>
public <B>MimeMessage</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A> session)</PRE>
<DL>
<DD>Default constructor. An empty message object is created.
The <code>headers</code> field is set to an empty InternetHeaders
object. The <code>flags</code> field is set to an empty Flags
object. The <code>modified</code> flag is set to true.
<P>
</DL>
<HR>
<A NAME="MimeMessage(javax.mail.Session, java.io.InputStream)"><!-- --></A><H3>
MimeMessage</H3>
<PRE>
public <B>MimeMessage</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A> session,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Constructs a MimeMessage by reading and parsing the data from the
specified MIME InputStream. The InputStream will be left positioned
at the end of the data for the message. Note that the input stream
parse is done within this constructor itself. <p>
The input stream contains an entire MIME formatted message with
headers and data.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - Session object for this message<DD><CODE>is</CODE> - the message input stream
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DL>
<HR>
<A NAME="MimeMessage(javax.mail.internet.MimeMessage)"><!-- --></A><H3>
MimeMessage</H3>
<PRE>
public <B>MimeMessage</B>(<A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage</A> source)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Constructs a new MimeMessage with content initialized from the
<code>source</code> MimeMessage. The new message is independent
of the original. <p>
Note: The current implementation is rather inefficient, copying
the data more times than strictly necessary.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - the message to copy content from
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DL>
<HR>
<A NAME="MimeMessage(javax.mail.Folder, int)"><!-- --></A><H3>
MimeMessage</H3>
<PRE>
protected <B>MimeMessage</B>(<A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder,
int msgnum)</PRE>
<DL>
<DD>Constructs an empty MimeMessage object with the given Folder
and message number. <p>
This method is for providers subclassing <code>MimeMessage</code>.
<P>
</DL>
<HR>
<A NAME="MimeMessage(javax.mail.Folder, java.io.InputStream, int)"><!-- --></A><H3>
MimeMessage</H3>
<PRE>
protected <B>MimeMessage</B>(<A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is,
int msgnum)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Constructs a MimeMessage by reading and parsing the data from the
specified MIME InputStream. The InputStream will be left positioned
at the end of the data for the message. Note that the input stream
parse is done within this constructor itself. <p>
This method is for providers subclassing <code>MimeMessage</code>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>folder</CODE> - The containing folder.<DD><CODE>is</CODE> - the message input stream<DD><CODE>msgnum</CODE> - Message number of this message within its folder
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DL>
<HR>
<A NAME="MimeMessage(javax.mail.Folder, javax.mail.internet.InternetHeaders, byte[], int)"><!-- --></A><H3>
MimeMessage</H3>
<PRE>
protected <B>MimeMessage</B>(<A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> folder,
<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A> headers,
byte[] content,
int msgnum)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Constructs a MimeMessage from the given InternetHeaders object
and content.
This method is for providers subclassing <code>MimeMessage</code>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>folder</CODE> - The containing folder.<DD><CODE>headers</CODE> - The headers<DD><CODE>content</CODE> - The message content<DD><CODE>msgnum</CODE> - Message number of this message within its folder
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="parse(java.io.InputStream)"><!-- --></A><H3>
parse</H3>
<PRE>
protected void <B>parse</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Parse the InputStream setting the <code>headers</code> and
<code>content</code> fields appropriately. Also resets the
<code>modified</code> flag. <p>
This method is intended for use by subclasses that need to
control when the InputStream is parsed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - The message input stream
<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="getFrom()"><!-- --></A><H3>
getFrom</H3>
<PRE>
public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getFrom</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the RFC 822 "From" header fields. If this
header field is absent, the "Sender" header field is used.
If the "Sender" header field is also absent, <code>null</code>
is returned.<p>
This implementation uses the <code>getHeader</code> method
to obtain the requisite header field.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#getFrom()">getFrom</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Address object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#headers"><CODE>headers</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setFrom(javax.mail.Address)"><!-- --></A><H3>
setFrom</H3>
<PRE>
public void <B>setFrom</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A> address)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the RFC 822 "From" header field. Any existing values are
replaced with the given address. If address is <code>null</code>,
this header is removed.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#setFrom(javax.mail.Address)">setFrom</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender of this message
<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
of existing values
<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 message 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="setFrom()"><!-- --></A><H3>
setFrom</H3>
<PRE>
public void <B>setFrom</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the RFC 822 "From" header field using the value of the
<code>InternetAddress.getLocalAddress</code> method.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#setFrom()">setFrom</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></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
of existing values
<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 message 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="addFrom(javax.mail.Address[])"><!-- --></A><H3>
addFrom</H3>
<PRE>
public void <B>addFrom</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] addresses)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Add the specified addresses to the existing "From" field. If
the "From" field does not already exist, it is created.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#addFrom(javax.mail.Address[])">addFrom</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresses</CODE> - the senders of this message
<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
of existing values
<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 message 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="getSender()"><!-- --></A><H3>
getSender</H3>
<PRE>
public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A> <B>getSender</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the RFC 822 "Sender" header field.
If the "Sender" header field is absent, <code>null</code>
is returned.<p>
This implementation uses the <code>getHeader</code> method
to obtain the requisite header field.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Address object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.3</DD>
<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#headers"><CODE>headers</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setSender(javax.mail.Address)"><!-- --></A><H3>
setSender</H3>
<PRE>
public void <B>setSender</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A> address)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the RFC 822 "Sender" header field. Any existing values are
replaced with the given address. If address is <code>null</code>,
this header is removed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender of this message
<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
of existing values
<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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.3</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getRecipients(javax.mail.Message.RecipientType)"><!-- --></A><H3>
getRecipients</H3>
<PRE>
public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A> type)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Returns the recepients specified by the type. The mapping
between the type and the corresponding RFC 822 header is
as follows:
<pre>
Message.RecipientType.TO "To"
Message.RecipientType.CC "Cc"
Message.RecipientType.BCC "Bcc"
MimeMessage.RecipientType.NEWSGROUPS "Newsgroups"
</pre><br>
Returns null if the header specified by the type is not found
or if its value is empty. <p>
This implementation uses the <code>getHeader</code> method
to obtain the requisite header field.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#getRecipients(javax.mail.Message.RecipientType)">getRecipients</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - Type of recepient
<DT><B>Returns:</B><DD>array of Address objects
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if header could not
be retrieved
<DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the header is misformatted<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#headers"><CODE>headers</CODE></A>,
<A HREF="../../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>,
<A HREF="../../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>,
<A HREF="../../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A>,
<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html#NEWSGROUPS"><CODE>MimeMessage.RecipientType.NEWSGROUPS</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getAllRecipients()"><!-- --></A><H3>
getAllRecipients</H3>
<PRE>
public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getAllRecipients</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get all the recipient addresses for the message.
Extracts the TO, CC, BCC, and NEWSGROUPS recipients.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#getAllRecipients()">getAllRecipients</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>array of Address objects
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>,
<A HREF="../../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>,
<A HREF="../../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A>,
<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html#NEWSGROUPS"><CODE>MimeMessage.RecipientType.NEWSGROUPS</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
setRecipients</H3>
<PRE>
public void <B>setRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A> type,
<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] addresses)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the specified recipient type to the given addresses.
If the address parameter is <code>null</code>, the corresponding
recipient field is removed.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])">setRecipients</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
<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
of existing values
<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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#getRecipients(javax.mail.Message.RecipientType)"><CODE>getRecipients(javax.mail.Message.RecipientType)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setRecipients(javax.mail.Message.RecipientType, java.lang.String)"><!-- --></A><H3>
setRecipients</H3>
<PRE>
public void <B>setRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A> type,
<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> addresses)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the specified recipient type to the given addresses.
If the address parameter is <code>null</code>, the corresponding
recipient field is removed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the attempt to parse the
addresses String fails
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
implementation does not support modification
of existing values
<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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#getRecipients(javax.mail.Message.RecipientType)"><CODE>getRecipients(javax.mail.Message.RecipientType)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
addRecipients</H3>
<PRE>
public void <B>addRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A> type,
<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] addresses)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Add the given addresses to the specified recipient type.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])">addRecipients</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
<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
of existing values
<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 message 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="addRecipients(javax.mail.Message.RecipientType, java.lang.String)"><!-- --></A><H3>
addRecipients</H3>
<PRE>
public void <B>addRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A> type,
<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> addresses)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Add the given addresses to the specified recipient type.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the attempt to parse the
addresses String fails
<DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
implementation does not support modification
of existing values
<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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getReplyTo()"><!-- --></A><H3>
getReplyTo</H3>
<PRE>
public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getReplyTo</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Return the value of the RFC 822 "Reply-To" header field. If
this header is unavailable or its value is absent, then
the <code>getFrom</code> method is called and its value is returned.
This implementation uses the <code>getHeader</code> method
to obtain the requisite header field.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#getReplyTo()">getReplyTo</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>addresses to which replies should be directed
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#headers"><CODE>headers</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setReplyTo(javax.mail.Address[])"><!-- --></A><H3>
setReplyTo</H3>
<PRE>
public void <B>setReplyTo</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] addresses)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the RFC 822 "Reply-To" header field. If the address
parameter is <code>null</code>, this header is removed.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#setReplyTo(javax.mail.Address[])">setReplyTo</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresses</CODE> - addresses to which replies should be directed
<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
of existing values
<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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
<DD><CODE><A HREF="../../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail">MethodNotSupportedException</A></CODE> - if the underlying
implementation does not support setting this
attribute</DL>
</DD>
</DL>
<HR>
<A NAME="getSubject()"><!-- --></A><H3>
getSubject</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getSubject</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the "Subject" header field. Returns null
if the subject field is unavailable or its value is absent. <p>
If the subject 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 the <code>getHeader</code> method
to obtain the requisite header field.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#getSubject()">getSubject</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Subject
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#headers"><CODE>headers</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setSubject(java.lang.String)"><!-- --></A><H3>
setSubject</H3>
<PRE>
public void <B>setSubject</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> subject)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Set the "Subject" header field. If the subject contains
non US-ASCII characters, it will be encoded using the
platform's default charset. If the subject contains only
US-ASCII characters, no encoding is done and it is used
as-is. If the subject is null, the existing "Subject" field
The application must ensure that the subject does not contain
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.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#setSubject(java.lang.String)">setSubject<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DD><
CODE><
A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException<
/A><
/CODE> - if the underlying
implementation does not support modification
of existing values
<
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 message is
obtained from a READ_ONLY folder.
UnsupportedEncodingException may be included
in the exception chain if the charset
conversion fails.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setSubject(java.lang.String, java.lang.String)"><!-- --><
/A><
H3>
public void <
B>setSubject<
/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> subject,
<
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>
<
DD>Set the
"Subject" header field. If the subject contains non
US-ASCII characters, it will be encoded using the specified
charset. If the subject contains only US-ASCII characters, no
encoding is done and it is used as-is. If the subject is null,
the existing
"Subject" header field is removed. <
p>
The application must ensure that the subject does not contain
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><
CODE><
A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException<
/A><
/CODE> - if the underlying
implementation does not support modification
of existing values
<
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 message is
obtained from a READ_ONLY folder.
UnsupportedEncodingException may be included
in the exception chain if the charset
conversion fails.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getSentDate()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date<
/A> <
B>getSentDate<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Returns the
value of the RFC
822 "Date" field. This is the date
on which this message was sent. Returns null if this field is
unavailable or its
value is absent. <
p>
This implementation uses the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#getSentDate()">getSentDate<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>The sent Date
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setSentDate(java.util.Date)"><!-- --><
/A><
H3>
public void <
B>setSentDate<
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date<
/A> d
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Set the RFC
822 "Date" header field. This is the date on which the
creator of the message indicates that the message is complete
and ready for delivery. If the date parameter is
<
code>null<
/code>, the existing
"Date" field is removed.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#setSentDate(java.util.Date)">setSentDate<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DT><
B>Parameters:<
/B><
DD><
CODE>d<
/CODE> - the sent date of this message
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getReceivedDate()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date<
/A> <
B>getReceivedDate<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Returns the Date on this message was received. Returns
<
code>null<
/code> if this date cannot be obtained. <
p>
Note that RFC 822 does not define a field for the received
date. Hence only implementations that can provide this date
need return a valid
value. <
p>
This implementation returns <
code>null<
/code>.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#getReceivedDate()">getReceivedDate<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>the date this message was received
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getSize()"><!-- --><
/A><
H3>
public int <
B>getSize<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Return the
size of the
content of this message 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.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>
size of
content in bytes
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getLineCount()"><!-- --><
/A><
H3>
public int <
B>getLineCount<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Return the number of lines
for the
content of this message.
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.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>number of lines in the
content.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getContentType()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> <
B>getContentType<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Returns the
value of the RFC
822 "Content-Type" header field.
This represents the content-type of the content of this
message. This value must not be null. If this field is
unavailable,
"text/plain" should be returned. <
p>
This implementation uses the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>The ContentType of this part
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation"><
CODE>DataHandler<
/CODE><
/A><
/DL>
<
A NAME="isMimeType(java.lang.String)"><!-- --><
/A><
H3>
public boolean <
B>isMimeType<
/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> mimeType
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Is this Part of the specified MIME
type? This
method
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>
special character '*', then the subtype is ignored during the
comparison.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getDisposition()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> <
B>getDisposition<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
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,
This implementation uses the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>disposition of this part, or null if unknown
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="../../../javax/mail/Part.html#ATTACHMENT"><
CODE>Part.ATTACHMENT<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Part.html#INLINE"><
CODE>Part.INLINE<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Part.html#getFileName()"><
CODE>Part.getFileName
()<
/CODE><
/A><
/DL>
<
A NAME="setDisposition(java.lang.String)"><!-- --><
/A><
H3>
public void <
B>setDisposition<
/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> disposition
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Set the
"Content-Disposition" header field of this Message.
If <
code>disposition<
/code> is null, any existing
"Content-Disposition"
header field is removed.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Parameters:<
/B><
DD><
CODE>disposition<
/CODE> - disposition of this part
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="../../../javax/mail/Part.html#ATTACHMENT"><
CODE>Part.ATTACHMENT<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Part.html#INLINE"><
CODE>Part.INLINE<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Part.html#setFileName(java.lang.String)"><
CODE>Part.setFileName
(java.
lang.String
)<
/CODE><
/A><
/DL>
<
A NAME="getEncoding()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> <
B>getEncoding<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
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 the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
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" title="interface in javax.mail.internet">MimePart<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>content-transfer-encoding
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getContentID()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> <
B>getContentID<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Returns the
value of the
"Content-ID" header field. Returns
<
code>null<
/code> if the field is unavailable or its
value is
This implementation uses the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
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" title="interface in javax.mail.internet">MimePart<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>content-
ID
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setContentID(java.lang.String)"><!-- --><
/A><
H3>
public void <
B>setContentID<
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> cid
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Set the
"Content-ID" header field of this Message.
If the <
code>cid<
/code> parameter is null, any existing
"Content-ID" is removed.
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getContentMD5()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> <
B>getContentMD5<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Return the
value of the
"Content-MD5" header field. Returns
<
code>null<
/code> if this field is unavailable or its
value
This implementation uses the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
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" title="interface in javax.mail.internet">MimePart<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>content-MD5
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setContentMD5(java.lang.String)"><!-- --><
/A><
H3>
public 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>
<
DD>Set the
"Content-MD5" header field of this Message.
<
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" title="interface in javax.mail.internet">MimePart<
/A><
/CODE><
/DL>
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getDescription()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String<
/A> <
B>getDescription<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Returns the
"Content-Description" header field of this Message.
This typically associates some descriptive information with
this part. Returns null if this field is unavailable or its
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 the <
code>getHeader<
/code>
method
to obtain the requisite header field.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>content-description
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setDescription(java.lang.String)"><!-- --><
/A><
H3>
public void <
B>setDescription<
/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> description
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Set the
"Content-Description" header field
for this Message.
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.
<P>
<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" title="interface in javax.mail">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" 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 message is
obtained from a READ_ONLY folder.
<DD><CODE>MessagingException.</CODE> - An
UnsupportedEncodingException may be included
in the exception chain if the charset
conversion fails.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setDescription(java.lang.String, java.lang.String)"><!-- --></A><H3>
setDescription</H3>
<PRE>
public void <B>setDescription</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> description,
<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>Set the "Content-Description" header field for this Message.
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.
<P>
<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" 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 message is
obtained from a READ_ONLY folder.
<DD><CODE>MessagingException.</CODE> - An
UnsupportedEncodingException may be included
in the exception chain if the charset
conversion fails.
<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>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>getContentLanguage</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the languages specified in the "Content-Language" header
field of this message. The Content-Language header is defined by
RFC 1766. Returns <code>null</code> if this field is unavailable
or its value is absent. <p>
This implementation uses the <code>getHeader</code> method
to obtain the requisite header field.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>value of content-language header.
<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>
public 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 RFC 1766.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></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 message 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="getMessageID()"><!-- --></A><H3>
getMessageID</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getMessageID</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Returns the value of the "Message-ID" header field. Returns
null if this field is unavailable or its value is absent. <p>
The default implementation provided here uses the
<code>getHeader</code> method to return the value of the
"Message-ID" field.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Message-ID
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if the retrieval of this field
causes any exception.<DT><B>Since:</B></DT>
<DD>JavaMail 1.1</DD>
<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/search/MessageIDTerm.html" title="class in javax.mail.search"><CODE>MessageIDTerm</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFileName()"><!-- --></A><H3>
getFileName</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getFileName</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Get the filename associated with this Message. <p>
Returns the value of the "filename" parameter from the
"Content-Disposition" header field of this message. If it's
not available, returns the value of the "name" parameter from
the "Content-Type" header field of this BodyPart.
Returns <
code>null<
/code> if both are absent. <
p>
If the <
code>mail.mime.encodefilename<
/code> System property
is set to true, the <
A HREF="../../../javax/mail/internet/MimeUtility.html#decodeText(java.lang.String)"><
CODE>MimeUtility.decodeText<
/CODE><
/A>
method will be used to decode the
filename. While such encoding is not supported by the MIME
spec, many mailers use this technique to support non-ASCII
characters in filenames. The default value of this property
is false.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>filename
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setFileName(java.lang.String)"><!-- --><
/A><
H3>
public void <
B>setFileName<
/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> filename
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Set the filename associated with this part, if possible. <
p>
Sets the "filename" parameter of the "Content-Disposition"
header field of this message. <
p>
If the <
code>mail.mime.encodefilename<
/code> System property
is set to true, the <
A HREF="../../../javax/mail/internet/MimeUtility.html#encodeText(java.lang.String)"><
CODE>MimeUtility.encodeText<
/CODE><
/A>
method will be used to encode the
filename. While such encoding is not supported by the MIME
spec, many mailers use this technique to support non-ASCII
characters in filenames. The default value of this property
is false.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Parameters:<
/B><
DD><
CODE>filename<
/CODE> - Filename to associate with this part
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getInputStream()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream<
/A> <
B>getInputStream<
/B>
()
throws <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException<
/A>,
<
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Return a decoded input stream
for this Message
's "content". <p>
This implementation obtains the input stream from the DataHandler,
that is, it invokes <code>getDataHandler().getInputStream()</code>.
<P>
<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" title="interface in javax.mail">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" title="class in javax.mail">MessagingException</A></CODE>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - 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/MimeMessage.html#getContentStream()"><CODE>getContentStream()</CODE></A>,
<A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true#getInputStream()" title="class or interface in javax.activation"><CODE>DataHandler.getInputStream()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getContentStream()"><!-- --></A><H3>
getContentStream</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> <B>getContentStream</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Produce the raw bytes of the content. This method is used during
parsing, to create a DataHandler object for the content. Subclasses
that can provide a separate input stream for just the message
content might want to override this method. <p>
This implementation returns a SharedInputStream, if
<code>contentStream</code> is not null. Otherwise, it
returns a ByteArrayInputStream constructed
out of the <code>content</code> byte array.
<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><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#content"><CODE>content</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getRawInputStream()"><!-- --></A><H3>
getRawInputStream</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> <B>getRawInputStream</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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.
<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><DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#getInputStream()"><CODE>getInputStream()</CODE></A>,
<A HREF="../../../javax/mail/internet/MimeMessage.html#getContentStream()"><CODE>getContentStream()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getDataHandler()"><!-- --></A><H3>
getDataHandler</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation">DataHandler</A> <B>getDataHandler</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Return a DataHandler for this Message's
content. <
p>
The implementation provided here works as follows. Note the use of
the <
code>getContentStream<
/code>
method to
generate the byte stream for the content. Also note that
any transfer-decoding is done automatically within this
method.<
p>
getDataHandler() {
if (dh == null) {
dh = new DataHandler(new MimePartDataSource(this));
}
return dh;
}
class MimePartDataSource implements DataSource {
public getInputStream() {
return MimeUtility.decode(
getContentStream(), getEncoding());
}
.... <other DataSource methods>
}
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>DataHandler
for the
content
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="getContent()"><!-- --><
/A><
H3>
public <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object<
/A> <
B>getContent<
/B>
()
throws <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException<
/A>,
<
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Return the
content as a Java
object. The
type of this
object is 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"
message is always a Multipart subclass. For content types that are
unknown to the DataHandler system, an input stream is returned
This implementation obtains the content from the DataHandler,
that is, it invokes <
code>getDataHandler
().getContent
()<
/code>.
If the content is a Multipart or Message object and was created by
parsing a stream, the object is cached and returned in subsequent
calls so that modifications to the content will not be lost.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE>
<
DD><
CODE><
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException<
/A><
/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/Part.html" title="interface in javax.mail"><
CODE>Part<
/CODE><
/A>,
<
A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true#getContent()" title="class or interface in javax.activation"><
CODE>DataHandler.getContent
()<
/CODE><
/A><
/DL>
<
A NAME="setDataHandler(javax.activation.DataHandler)"><!-- --><
/A><
H3>
public void <
B>setDataHandler<
/B>
(<
A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true" title="class or interface in javax.activation">DataHandler<
/A> dh
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>This
method provides the mechanism to set this part
's content.
The given DataHandler object should wrap the actual content.
<P>
<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" title="interface in javax.mail">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" 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 message 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="setContent(java.lang.Object, java.lang.String)"><!-- --></A><H3>
setContent</H3>
<PRE>
public void <B>setContent</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o,
<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> type)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>A convenience method for setting this Message'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.
i.e., 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.
<
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" title="interface in javax.mail">Part<
/A><
/CODE><
/DL>
<
DD><
CODE><
A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException<
/A><
/CODE> - if the underlying
implementation does not support modification of
existing values
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="setText(java.lang.String)"><!-- --><
/A><
H3>
public 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>
<
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
If the charset is already known, use the
<
code>setText<
/code>
method that takes the
charset parameter.
<
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" title="interface in javax.mail.internet">MimePart<
/A><
/CODE><
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><
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/MimeMessage.html#setText(java.lang.String, java.lang.String)"><
CODE>setText
(String
text, String
charset)<
/CODE><
/A><
/DL>
<
A NAME="setText(java.lang.String, java.lang.String)"><!-- --><
/A><
H3>
public 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>
<
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.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></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
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if an error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="setText(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
public 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>
<DL>
<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.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/internet/MimePart.html#setText(java.lang.String, java.lang.String, java.lang.String)">setText<
/A><
/CODE> in interface <
CODE><
A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet">MimePart<
/A><
/CODE><
/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")
<
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>
<
A NAME="setContent(javax.mail.Multipart)"><!-- --><
/A><
H3>
public void <
B>setContent<
/B>
(<
A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart<
/A> mp
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>This
method sets the Message
's content to a Multipart object.
<P>
<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" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mp</CODE> - The multipart object that is the Message's content
<
DD><
CODE><
A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException<
/A><
/CODE> - if the underlying
implementation does not support modification of
existing values
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="reply(boolean)"><!-- --><
/A><
H3>
public <
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> <
B>reply<
/B>
(boolean replyToAll
)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Get a new Message suitable
for a reply to this message.
The new Message will have its attributes and headers
set up appropriately. Note that this new message object
will be empty, i.e., it will <
strong>not<
/strong> have a
"content".
These will have to be suitably filled in by the client. <
p>
If <
code>replyToAll<
/code> is set, the new Message will be addressed
to all recipients of this message. Otherwise, the reply will be
addressed to only the sender of this message (using the value
The "Subject" field is filled in with the original subject
prefixed with "Re:" (unless it already starts with "Re:").
The "In-Reply-To" header is set in the new message if this
message has a
"Message-Id" header. The <
code>ANSWERED<
/code>
flag is set in this message.
The current implementation also sets the "References" header
in the new message to include the contents of the "References"
header (or, if missing, the "In-Reply-To" header) in this message,
plus the contents of the "Message-Id" header of this message,
as described in RFC 2822.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#reply(boolean)">reply<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DT><
B>Parameters:<
/B><
DD><
CODE>replyToAll<
/CODE> - reply should be sent to all recipients
of this message
<
DT><
B>Returns:<
/B><
DD>the reply Message
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="writeTo(java.io.OutputStream)"><!-- --><
/A><
H3>
public void <
B>writeTo<
/B>
(<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream<
/A> os
)
throws <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException<
/A>,
<
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Output the message as an RFC
822 format stream. <
p>
Note that, depending on how the messag was constructed, it may
use a variety of line termination conventions. Generally the
output should be sent through an appropriate FilterOutputStream
that converts the line terminators to the desired form, either
CRLF for MIME compatibility and for use in Internet protocols,
or the local platform's line terminator for storage in a local
text file. <p>
This implementation calls the <code>writeTo(OutputStream,
String[])</code> method with a null ignore list.
<P>
<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" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an error occurs writing to the stream
or if an error is generated by the
javax.activation layer.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true#writeTo(java.io.OutputStream)" title="class or interface in javax.activation"><CODE>DataHandler.writeTo(java.io.OutputStream)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="writeTo(java.io.OutputStream, java.lang.String[])"><!-- --></A><H3>
writeTo</H3>
<PRE>
public void <B>writeTo</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os,
<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>[] ignoreList)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
<A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Output the message as an RFC 822 format stream, without
specified headers. If the <code>saved</code> flag is not set,
the <code>saveChanges</code> method is called.
If the <code>modified</code> flag is not
set and the <code>content</code> array is not null, the
<code>content</code> array is written directly, after
writing the appropriate message headers.
<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>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an error occurs writing to the stream
or if an error is generated by the
javax.activation layer.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataHandler.html?is-external=true#writeTo(java.io.OutputStream)" title="class or interface in javax.activation"><CODE>DataHandler.writeTo(java.io.OutputStream)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getHeader(java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>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)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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. <p>
This implementation obtains the headers from the
<code>headers</code> InternetHeaders object.
<P>
<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" title="interface in javax.mail">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>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html" title="class in javax.mail.internet"><CODE>MimeUtility</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>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 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.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of this header<DD><CODE>delimiter</CODE> - separator between values
<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="setHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
setHeader</H3>
<PRE>
public void <B>setHeader</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> value)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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 have been encoded by the
caller as per the rules of RFC 2047.
<P>
<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" title="interface in javax.mail">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>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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html" title="class in javax.mail.internet"><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>(<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> value)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">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 have been encoded as per the rules of RFC 2047.
<P>
<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" title="interface in javax.mail">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>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 message is
obtained from a READ_ONLY folder.
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html" title="class in javax.mail.internet"><CODE>MimeUtility</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="removeHeader(java.lang.String)"><!-- --></A><H3>
removeHeader</H3>
<PRE>
public void <B>removeHeader</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)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Remove all headers with this name.
<P>
<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" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of this header
<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 message 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="getAllHeaders()"><!-- --></A><H3>
getAllHeaders</H3>
<PRE>
public <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>getAllHeaders</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Return all the headers from this Message as an enumeration
of Header objects. <p>
Note that certain headers may be encoded as per RFC 2047
if they contain non US-ASCII characters and these should
be decoded. <p>
This implementation obtains the headers from the
<code>headers</code> InternetHeaders object.
<P>
<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" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>array of header objects
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html" title="class in javax.mail.internet"><CODE>MimeUtility</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getMatchingHeaders(java.lang.String[])"><!-- --></A><H3>
getMatchingHeaders</H3>
<PRE>
public <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>getMatchingHeaders</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>Return matching headers from this Message as an Enumeration of
Header objects. This implementation obtains the headers from
the <code>headers</code> InternetHeaders object.
<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" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>enumeration of Header objects
<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="getNonMatchingHeaders(java.lang.String[])"><!-- --></A><H3>
getNonMatchingHeaders</H3>
<PRE>
public <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>getNonMatchingHeaders</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>Return non-matching headers from this Message as an
Enumeration of Header objects. This implementation
obtains the header from the <code>headers</code> InternetHeaders object.
<P>
<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" title="interface in javax.mail">Part</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>enumeration of Header objects
<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>
public 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 RFC 822 header-line.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></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 message 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>
public <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 RFC 822 header-line, containing both the "name"
and "value" field.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></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>
public <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 RFC 822 header-line, containing both
the "name" and "value" field.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></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>
public <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 RFC 822 header-line, containing both
the "name" and "value" field.
<P>
<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" title="interface in javax.mail.internet">MimePart</A></CODE></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="getFlags()"><!-- --></A><H3>
getFlags</H3>
<PRE>
public <A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>getFlags</B>()
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Return a <code>Flags</code> object containing the flags for
this message. <p>
Note that a clone of the internal Flags object is returned, so
modifying the returned Flags object will not affect the flags
of this message.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/Message.html#getFlags()">getFlags</A></CODE> in class <CODE><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Flags object containing the flags for this message
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../javax/mail/Flags.html" title="class in javax.mail"><CODE>Flags</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isSet(javax.mail.Flags.Flag)"><!-- --></A><H3>
isSet</H3>
<PRE>
public boolean <B>isSet</B>(<A HREF="../../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A> flag)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Check whether the flag specified in the <code>flag</code>
argument is set in this message. <p>
This implementation checks this message's internal
<
DT><
B>Overrides:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#isSet(javax.mail.Flags.Flag)">isSet<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DT><
B>Returns:<
/B><
DD>
value of the specified flag
for this message
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="../../../javax/mail/Flags.Flag.html" title="class in javax.mail"><
CODE>Flags.Flag<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Flags.Flag.html#ANSWERED"><
CODE>Flags.Flag.ANSWERED<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Flags.Flag.html#DELETED"><
CODE>Flags.Flag.DELETED<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Flags.Flag.html#DRAFT"><
CODE>Flags.Flag.DRAFT<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Flags.Flag.html#FLAGGED"><
CODE>Flags.Flag.FLAGGED<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Flags.Flag.html#RECENT"><
CODE>Flags.Flag.RECENT<
/CODE><
/A>,
<
A HREF="../../../javax/mail/Flags.Flag.html#SEEN"><
CODE>Flags.Flag.SEEN<
/CODE><
/A><
/DL>
<
A NAME="setFlags(javax.mail.Flags, boolean)"><!-- --><
/A><
H3>
public void <
B>setFlags<
/B>
(<
A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags<
/A> flag,
boolean set)
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Set the flags
for this message. <
p>
This implementation modifies the <
code>flags<
/code> field.
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)">setFlags<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
DT><
B>Parameters:<
/B><
DD><
CODE>flag<
/CODE> - Flags
object containing the flags to be set<
DD><
CODE>set<
/CODE> - the
value to be set
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="../../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><
CODE>MessageChangedEvent<
/CODE><
/A><
/DL>
<
A NAME="saveChanges()"><!-- --><
/A><
H3>
public void <
B>saveChanges<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Updates the appropriate header fields of this message to be
consistent with the message's contents. If this message is
contained in a Folder, any changes made to this message are
committed to the containing folder. <p>
If any part of a message's headers or contents are changed,
<
code>saveChanges<
/code> must be called to ensure that those
changes are permanent. Otherwise, any such modifications may or
may not be saved, depending on the folder implementation. <
p>
Messages obtained from folders opened READ_ONLY should not be
modified and saveChanges should not be called on such messages. <
p>
This
method sets the <
code>modified<
/code> flag to true, the
<
code>save<
/code> flag to true, and then calls the
<
DT><
B>Specified by:<
/B><
DD><
CODE><
A HREF="../../../javax/mail/Message.html#saveChanges()">saveChanges<
/A><
/CODE> in
class <
CODE><
A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message<
/A><
/CODE><
/DL>
<
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 message is
obtained from a READ_ONLY folder.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
/DL>
<
A NAME="updateMessageID()"><!-- --><
/A><
H3>
protected void <
B>updateMessageID<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Update the Message-
ID header. This
method is called
by the <
code>updateHeaders<
/code> and allows a subclass
to override only the algorithm for choosing a Message-ID.
<
DD><
CODE><
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>Since:<
/B><
/DT>
<
A NAME="updateHeaders()"><!-- --><
/A><
H3>
protected void <
B>updateHeaders<
/B>
()
throws <
A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Called by the <
code>saveChanges<
/code>
method to actually
update the MIME headers. The implementation here sets the
<
code>Content-Transfer-Encoding<
/code> header
(if needed
and not already set
), the <
code>MIME-Version<
/code> header
and the <
code>Message-ID<
/code> header. Also, if the
content
of this message is a <
code>MimeMultipart<
/code>, it
's
<code>updateHeaders</code> method is called.
<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 message 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="createInternetHeaders(java.io.InputStream)"><!-- --></A><H3>
createInternetHeaders</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A> <B>createInternetHeaders</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> is)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Create and return an InternetHeaders object that loads the
headers from the given InputStream. Subclasses can override
this method to return a subclass of InternetHeaders, if
necessary. This implementation simply constructs and returns
an InternetHeaders object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - the InputStream to read the headers from
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="createMimeMessage(javax.mail.Session)"><!-- --></A><H3>
createMimeMessage</H3>
<PRE>
protected <A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage</A> <B>createMimeMessage</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A> session)
throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
<DL>
<DD>Create and return a MimeMessage object. The reply method
uses this method to create the MimeMessage object that it
will return. Subclasses can override this method to return
a subclass of MimeMessage. This implementation simply constructs
and returns a MimeMessage object using the supplied Session.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the Session to use for the new message
<DT><B>Returns:</B><DD>the new MimeMessage object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
<DD>JavaMail 1.4</DD>
</DL>
</DD>
</DL>
<!-- ========= 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/MimeMessage.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/MimeBodyPart.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>
<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.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/MimeMessage.html" target="_top"><B>FRAMES</B></A>
<A HREF="MimeMessage.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: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
</BODY>
</HTML>