Subversion Repositories javautils

Rev

Blame | Last modification | View Log | RSS feed

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:40 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. MimeMessage (JavaMail API documentation)
  9. </TITLE>
  10.  
  11. <META NAME="date" CONTENT="2009-11-17">
  12.  
  13. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
  14.  
  15. <SCRIPT type="text/javascript">
  16. function windowTitle()
  17. {
  18.     if (location.href.indexOf('is-external=true') == -1) {
  19.         parent.document.title="MimeMessage (JavaMail API documentation)";
  20.     }
  21. }
  22. </SCRIPT>
  23. <NOSCRIPT>
  24. </NOSCRIPT>
  25.  
  26. </HEAD>
  27.  
  28. <BODY BGCOLOR="white" onload="windowTitle();">
  29. <HR>
  30.  
  31.  
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <A NAME="navbar_top"><!-- --></A>
  34. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  35. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  36. <TR>
  37. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  38. <A NAME="navbar_top_firstrow"><!-- --></A>
  39. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  40.   <TR ALIGN="center" VALIGN="top">
  41.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  42.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  43.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  44.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MimeMessage.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  45.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  46.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  47.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  48.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  49.   </TR>
  50. </TABLE>
  51. </TD>
  52. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  53. </EM>
  54. </TD>
  55. </TR>
  56.  
  57. <TR>
  58. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  59. &nbsp;<A HREF="../../../javax/mail/internet/MimeBodyPart.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html" title="class in javax.mail.internet"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../../index.html?javax/mail/internet/MimeMessage.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="MimeMessage.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  64. &nbsp;<SCRIPT type="text/javascript">
  65.   <!--
  66.   if(window==top) {
  67.     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  68.   }
  69.   //-->
  70. </SCRIPT>
  71. <NOSCRIPT>
  72.   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  73. </NOSCRIPT>
  74.  
  75.  
  76. </FONT></TD>
  77. </TR>
  78. <TR>
  79. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  80.   SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  81. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  82. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  83. </TR>
  84. </TABLE>
  85. <A NAME="skip-navbar_top"></A>
  86. <!-- ========= END OF TOP NAVBAR ========= -->
  87.  
  88. <HR>
  89. <!-- ======== START OF CLASS DATA ======== -->
  90. <H2>
  91. <FONT SIZE="-1">
  92. javax.mail.internet</FONT>
  93. <BR>
  94. Class MimeMessage</H2>
  95. <PRE>
  96. <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>
  97.   <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/mail/Message.html" title="class in javax.mail">javax.mail.Message</A>
  98.       <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.mail.internet.MimeMessage</B>
  99. </PRE>
  100. <DL>
  101. <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>
  102. </DL>
  103. <DL>
  104. <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>
  105. </DL>
  106. <HR>
  107. <DL>
  108. <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>
  109. </PRE>
  110.  
  111. <P>
  112. This class represents a MIME style email message. It implements
  113.  the <code>Message</code> abstract class and the <code>MimePart</code>
  114.  interface. <p>
  115.  
  116.  Clients wanting to create new MIME style messages will instantiate
  117.  an empty MimeMessage object and then fill it with appropriate
  118.  attributes and content. <p>
  119.  
  120.  Service providers that implement MIME compliant backend stores may
  121.  want to subclass MimeMessage and override certain methods to provide
  122.  specific implementations. The simplest case is probably a provider
  123.  that generates a MIME style input stream and leaves the parsing of
  124.  the stream to this class. <p>
  125.  
  126.  MimeMessage uses the <code>InternetHeaders</code> class to parse and
  127.  store the top level RFC 822 headers of a message. <p>
  128.  
  129.  The <code>mail.mime.address.strict</code> session property controls
  130.  the parsing of address headers.  By default, strict parsing of address
  131.  headers is done.  If this property is set to <code>"false"</code>,
  132.  strict parsing is not done and many illegal addresses that sometimes
  133.  occur in real messages are allowed.  See the <code>InternetAddress</code>
  134.  class for details. <p>
  135.  
  136.  <hr><strong>A note on RFC 822 and MIME headers</strong><p>
  137.  
  138.  RFC 822 header fields <strong>must</strong> contain only
  139.  US-ASCII characters. MIME allows non ASCII characters to be present
  140.  in certain portions of certain headers, by encoding those characters.
  141.  RFC 2047 specifies the rules for doing this. The MimeUtility
  142.  class provided in this package can be used to to achieve this.
  143.  Callers of the <code>setHeader</code>, <code>addHeader</code>, and
  144.  <code>addHeaderLine</code> methods are responsible for enforcing
  145.  the MIME requirements for the specified headers.  In addition, these
  146.  header fields must be folded (wrapped) before being sent if they
  147.  exceed the line length limitation for the transport (1000 bytes for
  148.  SMTP).  Received headers may have been folded.  The application is
  149.  responsible for folding and unfolding headers as appropriate. <p>
  150. <P>
  151.  
  152. <P>
  153. <DL>
  154. <DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeUtility.html" title="class in javax.mail.internet"><CODE>MimeUtility</CODE></A>,
  155. <A HREF="../../../javax/mail/Part.html" title="interface in javax.mail"><CODE>Part</CODE></A>,
  156. <A HREF="../../../javax/mail/Message.html" title="class in javax.mail"><CODE>Message</CODE></A>,
  157. <A HREF="../../../javax/mail/internet/MimePart.html" title="interface in javax.mail.internet"><CODE>MimePart</CODE></A>,
  158. <A HREF="../../../javax/mail/internet/InternetAddress.html" title="class in javax.mail.internet"><CODE>InternetAddress</CODE></A></DL>
  159. <HR>
  160.  
  161. <P>
  162. <!-- ======== NESTED CLASS SUMMARY ======== -->
  163.  
  164. <A NAME="nested_class_summary"><!-- --></A>
  165. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  166. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  167. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  168. <B>Nested Class Summary</B></FONT></TH>
  169. </TR>
  170. <TR BGCOLOR="white" CLASS="TableRowColor">
  171. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  172. <CODE>static&nbsp;class</CODE></FONT></TD>
  173. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html" title="class in javax.mail.internet">MimeMessage.RecipientType</A></B></CODE>
  174.  
  175. <BR>
  176. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This inner class extends the javax.mail.Message.RecipientType
  177.  class to add additional RecipientTypes.</TD>
  178. </TR>
  179. </TABLE>
  180. &nbsp;<!-- =========== FIELD SUMMARY =========== -->
  181.  
  182. <A NAME="field_summary"><!-- --></A>
  183. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  184. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  185. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  186. <B>Field Summary</B></FONT></TH>
  187. </TR>
  188. <TR BGCOLOR="white" CLASS="TableRowColor">
  189. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  190. <CODE>protected &nbsp;byte[]</CODE></FONT></TD>
  191. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#content">content</A></B></CODE>
  192.  
  193. <BR>
  194. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Byte array that holds the bytes of this Message's content.</TD>
  195. </TR>
  196. <TR BGCOLOR="white" CLASS="TableRowColor">
  197. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  198. <CODE>protected &nbsp;<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>
  199. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#contentStream">contentStream</A></B></CODE>
  200.  
  201. <BR>
  202. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the data for this message was supplied by an
  203. InputStream that implements the SharedInputStream interface,
  204. <code>contentStream</code> is another such stream representing
  205. the content of this message.</TD>
  206. </TR>
  207. <TR BGCOLOR="white" CLASS="TableRowColor">
  208. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  209. <CODE>protected &nbsp;<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>
  210. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#dh">dh</A></B></CODE>
  211.  
  212. <BR>
  213. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The DataHandler object representing this Message's content.</TD>
  214. </TR>
  215. <TR BGCOLOR="white" CLASS="TableRowColor">
  216. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  217. <CODE>protected &nbsp;<A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></CODE></FONT></TD>
  218. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#flags">flags</A></B></CODE>
  219.  
  220. <BR>
  221. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Flags for this message.</TD>
  222. </TR>
  223. <TR BGCOLOR="white" CLASS="TableRowColor">
  224. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  225. <CODE>protected &nbsp;<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A></CODE></FONT></TD>
  226. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#headers">headers</A></B></CODE>
  227.  
  228. <BR>
  229. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The InternetHeaders object that stores the header
  230.  of this message.</TD>
  231. </TR>
  232. <TR BGCOLOR="white" CLASS="TableRowColor">
  233. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  234. <CODE>protected &nbsp;boolean</CODE></FONT></TD>
  235. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#modified">modified</A></B></CODE>
  236.  
  237. <BR>
  238. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A flag indicating whether the message has been modified.</TD>
  239. </TR>
  240. <TR BGCOLOR="white" CLASS="TableRowColor">
  241. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  242. <CODE>protected &nbsp;boolean</CODE></FONT></TD>
  243. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#saved">saved</A></B></CODE>
  244.  
  245. <BR>
  246. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does the <code>saveChanges</code> method need to be called on
  247.  this message?  This flag is set to false by the public constructor
  248.  and set to true by the <code>saveChanges</code> method.</TD>
  249. </TR>
  250. </TABLE>
  251. &nbsp;<A NAME="fields_inherited_from_class_javax.mail.Message"><!-- --></A>
  252. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  253. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  254. <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>
  255. </TR>
  256. <TR BGCOLOR="white" CLASS="TableRowColor">
  257. <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>
  258. </TR>
  259. </TABLE>
  260. &nbsp;<A NAME="fields_inherited_from_class_javax.mail.Part"><!-- --></A>
  261. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  262. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  263. <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>
  264. </TR>
  265. <TR BGCOLOR="white" CLASS="TableRowColor">
  266. <TD><CODE><A HREF="../../../javax/mail/Part.html#ATTACHMENT">ATTACHMENT</A>, <A HREF="../../../javax/mail/Part.html#INLINE">INLINE</A></CODE></TD>
  267. </TR>
  268. </TABLE>
  269. &nbsp;
  270. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  271.  
  272. <A NAME="constructor_summary"><!-- --></A>
  273. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  274. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  275. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  276. <B>Constructor Summary</B></FONT></TH>
  277. </TR>
  278. <TR BGCOLOR="white" CLASS="TableRowColor">
  279. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  280. <CODE>protected </CODE></FONT></TD>
  281. <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>&nbsp;folder,
  282.             <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>&nbsp;is,
  283.             int&nbsp;msgnum)</CODE>
  284.  
  285. <BR>
  286. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a MimeMessage by reading and parsing the data from the
  287.  specified MIME InputStream.</TD>
  288. </TR>
  289. <TR BGCOLOR="white" CLASS="TableRowColor">
  290. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  291. <CODE>protected </CODE></FONT></TD>
  292. <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>&nbsp;folder,
  293.             int&nbsp;msgnum)</CODE>
  294.  
  295. <BR>
  296. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an empty MimeMessage object with the given Folder
  297.  and message number.</TD>
  298. </TR>
  299. <TR BGCOLOR="white" CLASS="TableRowColor">
  300. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  301. <CODE>protected </CODE></FONT></TD>
  302. <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>&nbsp;folder,
  303.             <A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A>&nbsp;headers,
  304.             byte[]&nbsp;content,
  305.             int&nbsp;msgnum)</CODE>
  306.  
  307. <BR>
  308. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a MimeMessage from the given InternetHeaders object
  309.  and content.</TD>
  310. </TR>
  311. <TR BGCOLOR="white" CLASS="TableRowColor">
  312. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  313. <CODE>&nbsp;</CODE></FONT></TD>
  314. <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>&nbsp;source)</CODE>
  315.  
  316. <BR>
  317. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new MimeMessage with content initialized from the
  318.  <code>source</code> MimeMessage.</TD>
  319. </TR>
  320. <TR BGCOLOR="white" CLASS="TableRowColor">
  321. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  322. <CODE>&nbsp;</CODE></FONT></TD>
  323. <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>&nbsp;session)</CODE>
  324.  
  325. <BR>
  326. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
  327. </TR>
  328. <TR BGCOLOR="white" CLASS="TableRowColor">
  329. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  330. <CODE>&nbsp;</CODE></FONT></TD>
  331. <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>&nbsp;session,
  332.             <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>&nbsp;is)</CODE>
  333.  
  334. <BR>
  335. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a MimeMessage by reading and parsing the data from the
  336.  specified MIME InputStream.</TD>
  337. </TR>
  338. </TABLE>
  339. &nbsp;
  340. <!-- ========== METHOD SUMMARY =========== -->
  341.  
  342. <A NAME="method_summary"><!-- --></A>
  343. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  344. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  345. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  346. <B>Method Summary</B></FONT></TH>
  347. </TR>
  348. <TR BGCOLOR="white" CLASS="TableRowColor">
  349. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  350. <CODE>&nbsp;void</CODE></FONT></TD>
  351. <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>[]&nbsp;addresses)</CODE>
  352.  
  353. <BR>
  354. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the specified addresses to the existing "From" field.</TD>
  355. </TR>
  356. <TR BGCOLOR="white" CLASS="TableRowColor">
  357. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  358. <CODE>&nbsp;void</CODE></FONT></TD>
  359. <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>&nbsp;name,
  360.           <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>&nbsp;value)</CODE>
  361.  
  362. <BR>
  363. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add this value to the existing values for this header_name.</TD>
  364. </TR>
  365. <TR BGCOLOR="white" CLASS="TableRowColor">
  366. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  367. <CODE>&nbsp;void</CODE></FONT></TD>
  368. <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>&nbsp;line)</CODE>
  369.  
  370. <BR>
  371. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a raw RFC 822 header-line.</TD>
  372. </TR>
  373. <TR BGCOLOR="white" CLASS="TableRowColor">
  374. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  375. <CODE>&nbsp;void</CODE></FONT></TD>
  376. <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>&nbsp;type,
  377.               <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)</CODE>
  378.  
  379. <BR>
  380. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the given addresses to the specified recipient type.</TD>
  381. </TR>
  382. <TR BGCOLOR="white" CLASS="TableRowColor">
  383. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  384. <CODE>&nbsp;void</CODE></FONT></TD>
  385. <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>&nbsp;type,
  386.               <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>&nbsp;addresses)</CODE>
  387.  
  388. <BR>
  389. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the given addresses to the specified recipient type.</TD>
  390. </TR>
  391. <TR BGCOLOR="white" CLASS="TableRowColor">
  392. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  393. <CODE>protected &nbsp;<A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A></CODE></FONT></TD>
  394. <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>&nbsp;is)</CODE>
  395.  
  396. <BR>
  397. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create and return an InternetHeaders object that loads the
  398.  headers from the given InputStream.</TD>
  399. </TR>
  400. <TR BGCOLOR="white" CLASS="TableRowColor">
  401. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  402. <CODE>protected &nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage</A></CODE></FONT></TD>
  403. <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>&nbsp;session)</CODE>
  404.  
  405. <BR>
  406. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create and return a MimeMessage object.</TD>
  407. </TR>
  408. <TR BGCOLOR="white" CLASS="TableRowColor">
  409. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  410. <CODE>&nbsp;<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>
  411. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getAllHeaderLines()">getAllHeaderLines</A></B>()</CODE>
  412.  
  413. <BR>
  414. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all header lines as an Enumeration of Strings.</TD>
  415. </TR>
  416. <TR BGCOLOR="white" CLASS="TableRowColor">
  417. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  418. <CODE>&nbsp;<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>
  419. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getAllHeaders()">getAllHeaders</A></B>()</CODE>
  420.  
  421. <BR>
  422. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return all the headers from this Message as an enumeration
  423.  of Header objects.</TD>
  424. </TR>
  425. <TR BGCOLOR="white" CLASS="TableRowColor">
  426. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  427. <CODE>&nbsp;<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  428. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getAllRecipients()">getAllRecipients</A></B>()</CODE>
  429.  
  430. <BR>
  431. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the recipient addresses for the message.</TD>
  432. </TR>
  433. <TR BGCOLOR="white" CLASS="TableRowColor">
  434. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  435. <CODE>&nbsp;<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>
  436. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getContent()">getContent</A></B>()</CODE>
  437.  
  438. <BR>
  439. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the content as a Java object.</TD>
  440. </TR>
  441. <TR BGCOLOR="white" CLASS="TableRowColor">
  442. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  443. <CODE>&nbsp;<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>
  444. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getContentID()">getContentID</A></B>()</CODE>
  445.  
  446. <BR>
  447. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the "Content-ID" header field.</TD>
  448. </TR>
  449. <TR BGCOLOR="white" CLASS="TableRowColor">
  450. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  451. <CODE>&nbsp;<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>
  452. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getContentLanguage()">getContentLanguage</A></B>()</CODE>
  453.  
  454. <BR>
  455. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the languages specified in the "Content-Language" header
  456.  field of this message.</TD>
  457. </TR>
  458. <TR BGCOLOR="white" CLASS="TableRowColor">
  459. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  460. <CODE>&nbsp;<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>
  461. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getContentMD5()">getContentMD5</A></B>()</CODE>
  462.  
  463. <BR>
  464. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the value of the "Content-MD5" header field.</TD>
  465. </TR>
  466. <TR BGCOLOR="white" CLASS="TableRowColor">
  467. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  468. <CODE>protected &nbsp;<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>
  469. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getContentStream()">getContentStream</A></B>()</CODE>
  470.  
  471. <BR>
  472. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce the raw bytes of the content.</TD>
  473. </TR>
  474. <TR BGCOLOR="white" CLASS="TableRowColor">
  475. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  476. <CODE>&nbsp;<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>
  477. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getContentType()">getContentType</A></B>()</CODE>
  478.  
  479. <BR>
  480. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the RFC 822 "Content-Type" header field.</TD>
  481. </TR>
  482. <TR BGCOLOR="white" CLASS="TableRowColor">
  483. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  484. <CODE>&nbsp;<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>
  485. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getDataHandler()">getDataHandler</A></B>()</CODE>
  486.  
  487. <BR>
  488. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a DataHandler for this Message's content.</TD>
  489. </TR>
  490. <TR BGCOLOR="white" CLASS="TableRowColor">
  491. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  492. <CODE>&nbsp;<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>
  493. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getDescription()">getDescription</A></B>()</CODE>
  494.  
  495. <BR>
  496. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the "Content-Description" header field of this Message.</TD>
  497. </TR>
  498. <TR BGCOLOR="white" CLASS="TableRowColor">
  499. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  500. <CODE>&nbsp;<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>
  501. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getDisposition()">getDisposition</A></B>()</CODE>
  502.  
  503. <BR>
  504. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the "Content-Disposition" header field.</TD>
  505. </TR>
  506. <TR BGCOLOR="white" CLASS="TableRowColor">
  507. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  508. <CODE>&nbsp;<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>
  509. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getEncoding()">getEncoding</A></B>()</CODE>
  510.  
  511. <BR>
  512. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the content transfer encoding from the
  513. "Content-Transfer-Encoding" header
  514. field.</TD>
  515. </TR>
  516. <TR BGCOLOR="white" CLASS="TableRowColor">
  517. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  518. <CODE>&nbsp;<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>
  519. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getFileName()">getFileName</A></B>()</CODE>
  520.  
  521. <BR>
  522. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the filename associated with this Message.</TD>
  523. </TR>
  524. <TR BGCOLOR="white" CLASS="TableRowColor">
  525. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  526. <CODE>&nbsp;<A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></CODE></FONT></TD>
  527. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getFlags()">getFlags</A></B>()</CODE>
  528.  
  529. <BR>
  530. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a <code>Flags</code> object containing the flags for
  531. this message.</TD>
  532. </TR>
  533. <TR BGCOLOR="white" CLASS="TableRowColor">
  534. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  535. <CODE>&nbsp;<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  536. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getFrom()">getFrom</A></B>()</CODE>
  537.  
  538. <BR>
  539. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the RFC 822 "From" header fields.</TD>
  540. </TR>
  541. <TR BGCOLOR="white" CLASS="TableRowColor">
  542. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  543. <CODE>&nbsp;<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>
  544. <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>&nbsp;name)</CODE>
  545.  
  546. <BR>
  547. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the headers for this header_name.</TD>
  548. </TR>
  549. <TR BGCOLOR="white" CLASS="TableRowColor">
  550. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  551. <CODE>&nbsp;<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>
  552. <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>&nbsp;name,
  553.          <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>&nbsp;delimiter)</CODE>
  554.  
  555. <BR>
  556. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the headers for this header name, returned as a single
  557. String, with headers separated by the delimiter.</TD>
  558. </TR>
  559. <TR BGCOLOR="white" CLASS="TableRowColor">
  560. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  561. <CODE>&nbsp;<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>
  562. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getInputStream()">getInputStream</A></B>()</CODE>
  563.  
  564. <BR>
  565. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a decoded input stream for this Message's "content".</TD>
  566. </TR>
  567. <TR BGCOLOR="white" CLASS="TableRowColor">
  568. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  569. <CODE>&nbsp;int</CODE></FONT></TD>
  570. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getLineCount()">getLineCount</A></B>()</CODE>
  571.  
  572. <BR>
  573. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number of lines for the content of this message.</TD>
  574. </TR>
  575. <TR BGCOLOR="white" CLASS="TableRowColor">
  576. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  577. <CODE>&nbsp;<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>
  578. <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>[]&nbsp;names)</CODE>
  579.  
  580. <BR>
  581. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get matching header lines as an Enumeration of Strings.</TD>
  582. </TR>
  583. <TR BGCOLOR="white" CLASS="TableRowColor">
  584. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  585. <CODE>&nbsp;<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>
  586. <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>[]&nbsp;names)</CODE>
  587.  
  588. <BR>
  589. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return matching headers from this Message as an Enumeration of
  590.  Header objects.</TD>
  591. </TR>
  592. <TR BGCOLOR="white" CLASS="TableRowColor">
  593. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  594. <CODE>&nbsp;<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>
  595. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getMessageID()">getMessageID</A></B>()</CODE>
  596.  
  597. <BR>
  598. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the "Message-ID" header field.</TD>
  599. </TR>
  600. <TR BGCOLOR="white" CLASS="TableRowColor">
  601. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  602. <CODE>&nbsp;<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>
  603. <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>[]&nbsp;names)</CODE>
  604.  
  605. <BR>
  606. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get non-matching header lines as an Enumeration of Strings.</TD>
  607. </TR>
  608. <TR BGCOLOR="white" CLASS="TableRowColor">
  609. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  610. <CODE>&nbsp;<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>
  611. <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>[]&nbsp;names)</CODE>
  612.  
  613. <BR>
  614. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return non-matching headers from this Message as an
  615.  Enumeration of Header objects.</TD>
  616. </TR>
  617. <TR BGCOLOR="white" CLASS="TableRowColor">
  618. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  619. <CODE>&nbsp;<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>
  620. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getRawInputStream()">getRawInputStream</A></B>()</CODE>
  621.  
  622. <BR>
  623. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an InputStream to the raw data with any Content-Transfer-Encoding
  624.  intact.</TD>
  625. </TR>
  626. <TR BGCOLOR="white" CLASS="TableRowColor">
  627. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  628. <CODE>&nbsp;<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>
  629. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getReceivedDate()">getReceivedDate</A></B>()</CODE>
  630.  
  631. <BR>
  632. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Date on this message was received.</TD>
  633. </TR>
  634. <TR BGCOLOR="white" CLASS="TableRowColor">
  635. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  636. <CODE>&nbsp;<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  637. <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>&nbsp;type)</CODE>
  638.  
  639. <BR>
  640. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the recepients specified by the type.</TD>
  641. </TR>
  642. <TR BGCOLOR="white" CLASS="TableRowColor">
  643. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  644. <CODE>&nbsp;<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  645. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getReplyTo()">getReplyTo</A></B>()</CODE>
  646.  
  647. <BR>
  648. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the value of the RFC 822 "Reply-To" header field.</TD>
  649. </TR>
  650. <TR BGCOLOR="white" CLASS="TableRowColor">
  651. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  652. <CODE>&nbsp;<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A></CODE></FONT></TD>
  653. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getSender()">getSender</A></B>()</CODE>
  654.  
  655. <BR>
  656. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the RFC 822 "Sender" header field.</TD>
  657. </TR>
  658. <TR BGCOLOR="white" CLASS="TableRowColor">
  659. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  660. <CODE>&nbsp;<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>
  661. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getSentDate()">getSentDate</A></B>()</CODE>
  662.  
  663. <BR>
  664. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the RFC 822 "Date" field.</TD>
  665. </TR>
  666. <TR BGCOLOR="white" CLASS="TableRowColor">
  667. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  668. <CODE>&nbsp;int</CODE></FONT></TD>
  669. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getSize()">getSize</A></B>()</CODE>
  670.  
  671. <BR>
  672. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the size of the content of this message in bytes.</TD>
  673. </TR>
  674. <TR BGCOLOR="white" CLASS="TableRowColor">
  675. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  676. <CODE>&nbsp;<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>
  677. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#getSubject()">getSubject</A></B>()</CODE>
  678.  
  679. <BR>
  680. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the "Subject" header field.</TD>
  681. </TR>
  682. <TR BGCOLOR="white" CLASS="TableRowColor">
  683. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  684. <CODE>&nbsp;boolean</CODE></FONT></TD>
  685. <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>&nbsp;mimeType)</CODE>
  686.  
  687. <BR>
  688. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is this Part of the specified MIME type?  This method
  689.  compares <strong>only the <code>primaryType</code> and
  690.  <code>subType</code></strong>.</TD>
  691. </TR>
  692. <TR BGCOLOR="white" CLASS="TableRowColor">
  693. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  694. <CODE>&nbsp;boolean</CODE></FONT></TD>
  695. <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>&nbsp;flag)</CODE>
  696.  
  697. <BR>
  698. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check whether the flag specified in the <code>flag</code>
  699.  argument is set in this message.</TD>
  700. </TR>
  701. <TR BGCOLOR="white" CLASS="TableRowColor">
  702. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  703. <CODE>protected &nbsp;void</CODE></FONT></TD>
  704. <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>&nbsp;is)</CODE>
  705.  
  706. <BR>
  707. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the InputStream setting the <code>headers</code> and
  708.  <code>content</code> fields appropriately.</TD>
  709. </TR>
  710. <TR BGCOLOR="white" CLASS="TableRowColor">
  711. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  712. <CODE>&nbsp;void</CODE></FONT></TD>
  713. <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>&nbsp;name)</CODE>
  714.  
  715. <BR>
  716. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove all headers with this name.</TD>
  717. </TR>
  718. <TR BGCOLOR="white" CLASS="TableRowColor">
  719. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  720. <CODE>&nbsp;<A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></FONT></TD>
  721. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#reply(boolean)">reply</A></B>(boolean&nbsp;replyToAll)</CODE>
  722.  
  723. <BR>
  724. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a new Message suitable for a reply to this message.</TD>
  725. </TR>
  726. <TR BGCOLOR="white" CLASS="TableRowColor">
  727. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  728. <CODE>&nbsp;void</CODE></FONT></TD>
  729. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#saveChanges()">saveChanges</A></B>()</CODE>
  730.  
  731. <BR>
  732. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the appropriate header fields of this message to be
  733.  consistent with the message's contents.</TD>
  734. </TR>
  735. <TR BGCOLOR="white" CLASS="TableRowColor">
  736. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  737. <CODE>&nbsp;void</CODE></FONT></TD>
  738. <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>&nbsp;mp)</CODE>
  739.  
  740. <BR>
  741. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method sets the Message's content to a Multipart object.</TD>
  742. </TR>
  743. <TR BGCOLOR="white" CLASS="TableRowColor">
  744. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  745. <CODE>&nbsp;void</CODE></FONT></TD>
  746. <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>&nbsp;o,
  747.            <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>&nbsp;type)</CODE>
  748.  
  749. <BR>
  750. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method for setting this Message's content.</TD>
  751. </TR>
  752. <TR BGCOLOR="white" CLASS="TableRowColor">
  753. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  754. <CODE>&nbsp;void</CODE></FONT></TD>
  755. <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>&nbsp;cid)</CODE>
  756.  
  757. <BR>
  758. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-ID" header field of this Message.</TD>
  759. </TR>
  760. <TR BGCOLOR="white" CLASS="TableRowColor">
  761. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  762. <CODE>&nbsp;void</CODE></FONT></TD>
  763. <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>[]&nbsp;languages)</CODE>
  764.  
  765. <BR>
  766. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Language" header of this MimePart.</TD>
  767. </TR>
  768. <TR BGCOLOR="white" CLASS="TableRowColor">
  769. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  770. <CODE>&nbsp;void</CODE></FONT></TD>
  771. <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>&nbsp;md5)</CODE>
  772.  
  773. <BR>
  774. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-MD5" header field of this Message.</TD>
  775. </TR>
  776. <TR BGCOLOR="white" CLASS="TableRowColor">
  777. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  778. <CODE>&nbsp;void</CODE></FONT></TD>
  779. <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>&nbsp;dh)</CODE>
  780.  
  781. <BR>
  782. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method provides the mechanism to set this part's content.</TD>
  783. </TR>
  784. <TR BGCOLOR="white" CLASS="TableRowColor">
  785. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  786. <CODE>&nbsp;void</CODE></FONT></TD>
  787. <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>&nbsp;description)</CODE>
  788.  
  789. <BR>
  790. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Description" header field for this Message.</TD>
  791. </TR>
  792. <TR BGCOLOR="white" CLASS="TableRowColor">
  793. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  794. <CODE>&nbsp;void</CODE></FONT></TD>
  795. <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>&nbsp;description,
  796.                <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>&nbsp;charset)</CODE>
  797.  
  798. <BR>
  799. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Description" header field for this Message.</TD>
  800. </TR>
  801. <TR BGCOLOR="white" CLASS="TableRowColor">
  802. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  803. <CODE>&nbsp;void</CODE></FONT></TD>
  804. <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>&nbsp;disposition)</CODE>
  805.  
  806. <BR>
  807. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Content-Disposition" header field of this Message.</TD>
  808. </TR>
  809. <TR BGCOLOR="white" CLASS="TableRowColor">
  810. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  811. <CODE>&nbsp;void</CODE></FONT></TD>
  812. <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>&nbsp;filename)</CODE>
  813.  
  814. <BR>
  815. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the filename associated with this part, if possible.</TD>
  816. </TR>
  817. <TR BGCOLOR="white" CLASS="TableRowColor">
  818. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  819. <CODE>&nbsp;void</CODE></FONT></TD>
  820. <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>&nbsp;flag,
  821.          boolean&nbsp;set)</CODE>
  822.  
  823. <BR>
  824. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the flags for this message.</TD>
  825. </TR>
  826. <TR BGCOLOR="white" CLASS="TableRowColor">
  827. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  828. <CODE>&nbsp;void</CODE></FONT></TD>
  829. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#setFrom()">setFrom</A></B>()</CODE>
  830.  
  831. <BR>
  832. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the RFC 822 "From" header field using the value of the
  833.  <code>InternetAddress.getLocalAddress</code> method.</TD>
  834. </TR>
  835. <TR BGCOLOR="white" CLASS="TableRowColor">
  836. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  837. <CODE>&nbsp;void</CODE></FONT></TD>
  838. <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>&nbsp;address)</CODE>
  839.  
  840. <BR>
  841. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the RFC 822 "From" header field.</TD>
  842. </TR>
  843. <TR BGCOLOR="white" CLASS="TableRowColor">
  844. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  845. <CODE>&nbsp;void</CODE></FONT></TD>
  846. <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>&nbsp;name,
  847.           <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>&nbsp;value)</CODE>
  848.  
  849. <BR>
  850. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value for this header_name.</TD>
  851. </TR>
  852. <TR BGCOLOR="white" CLASS="TableRowColor">
  853. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  854. <CODE>&nbsp;void</CODE></FONT></TD>
  855. <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>&nbsp;type,
  856.               <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)</CODE>
  857.  
  858. <BR>
  859. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified recipient type to the given addresses.</TD>
  860. </TR>
  861. <TR BGCOLOR="white" CLASS="TableRowColor">
  862. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  863. <CODE>&nbsp;void</CODE></FONT></TD>
  864. <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>&nbsp;type,
  865.               <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>&nbsp;addresses)</CODE>
  866.  
  867. <BR>
  868. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified recipient type to the given addresses.</TD>
  869. </TR>
  870. <TR BGCOLOR="white" CLASS="TableRowColor">
  871. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  872. <CODE>&nbsp;void</CODE></FONT></TD>
  873. <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>[]&nbsp;addresses)</CODE>
  874.  
  875. <BR>
  876. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the RFC 822 "Reply-To" header field.</TD>
  877. </TR>
  878. <TR BGCOLOR="white" CLASS="TableRowColor">
  879. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  880. <CODE>&nbsp;void</CODE></FONT></TD>
  881. <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>&nbsp;address)</CODE>
  882.  
  883. <BR>
  884. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the RFC 822 "Sender" header field.</TD>
  885. </TR>
  886. <TR BGCOLOR="white" CLASS="TableRowColor">
  887. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  888. <CODE>&nbsp;void</CODE></FONT></TD>
  889. <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>&nbsp;d)</CODE>
  890.  
  891. <BR>
  892. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the RFC 822 "Date" header field.</TD>
  893. </TR>
  894. <TR BGCOLOR="white" CLASS="TableRowColor">
  895. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  896. <CODE>&nbsp;void</CODE></FONT></TD>
  897. <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>&nbsp;subject)</CODE>
  898.  
  899. <BR>
  900. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Subject" header field.</TD>
  901. </TR>
  902. <TR BGCOLOR="white" CLASS="TableRowColor">
  903. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  904. <CODE>&nbsp;void</CODE></FONT></TD>
  905. <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>&nbsp;subject,
  906.            <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>&nbsp;charset)</CODE>
  907.  
  908. <BR>
  909. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "Subject" header field.</TD>
  910. </TR>
  911. <TR BGCOLOR="white" CLASS="TableRowColor">
  912. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  913. <CODE>&nbsp;void</CODE></FONT></TD>
  914. <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>&nbsp;text)</CODE>
  915.  
  916. <BR>
  917. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this
  918.  part's content, with a MIME type of "text/plain".</TD>
  919. </TR>
  920. <TR BGCOLOR="white" CLASS="TableRowColor">
  921. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  922. <CODE>&nbsp;void</CODE></FONT></TD>
  923. <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>&nbsp;text,
  924.        <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>&nbsp;charset)</CODE>
  925.  
  926. <BR>
  927. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this part's
  928.  content, with a MIME type of "text/plain" and the specified
  929.  charset.</TD>
  930. </TR>
  931. <TR BGCOLOR="white" CLASS="TableRowColor">
  932. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  933. <CODE>&nbsp;void</CODE></FONT></TD>
  934. <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>&nbsp;text,
  935.         <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>&nbsp;charset,
  936.         <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>&nbsp;subtype)</CODE>
  937.  
  938. <BR>
  939. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method that sets the given String as this part's
  940. content, with a primary MIME type of "text" and the specified
  941. MIME subtype.</TD>
  942. </TR>
  943. <TR BGCOLOR="white" CLASS="TableRowColor">
  944. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  945. <CODE>protected &nbsp;void</CODE></FONT></TD>
  946. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#updateHeaders()">updateHeaders</A></B>()</CODE>
  947.  
  948. <BR>
  949. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the <code>saveChanges</code> method to actually
  950. update the MIME headers.</TD>
  951. </TR>
  952. <TR BGCOLOR="white" CLASS="TableRowColor">
  953. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  954. <CODE>protected &nbsp;void</CODE></FONT></TD>
  955. <TD><CODE><B><A HREF="../../../javax/mail/internet/MimeMessage.html#updateMessageID()">updateMessageID</A></B>()</CODE>
  956.  
  957. <BR>
  958. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update the Message-ID header.</TD>
  959. </TR>
  960. <TR BGCOLOR="white" CLASS="TableRowColor">
  961. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  962. <CODE>&nbsp;void</CODE></FONT></TD>
  963. <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>&nbsp;os)</CODE>
  964.  
  965. <BR>
  966. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output the message as an RFC 822 format stream.</TD>
  967. </TR>
  968. <TR BGCOLOR="white" CLASS="TableRowColor">
  969. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  970. <CODE>&nbsp;void</CODE></FONT></TD>
  971. <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>&nbsp;os,
  972.        <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>[]&nbsp;ignoreList)</CODE>
  973.  
  974. <BR>
  975. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output the message as an RFC 822 format stream, without
  976. specified headers.</TD>
  977. </TR>
  978. </TABLE>
  979. &nbsp;<A NAME="methods_inherited_from_class_javax.mail.Message"><!-- --></A>
  980. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  981. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  982. <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>
  983. </TR>
  984. <TR BGCOLOR="white" CLASS="TableRowColor">
  985. <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>
  986. </TR>
  987. </TABLE>
  988. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  989. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  990. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  991. <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>
  992. </TR>
  993. <TR BGCOLOR="white" CLASS="TableRowColor">
  994. <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>
  995. </TR>
  996. </TABLE>
  997. &nbsp;
  998. <P>
  999.  
  1000. <!-- ============ FIELD DETAIL =========== -->
  1001.  
  1002. <A NAME="field_detail"><!-- --></A>
  1003. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  1004. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  1005. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  1006. <B>Field Detail</B></FONT></TH>
  1007. </TR>
  1008. </TABLE>
  1009.  
  1010. <A NAME="dh"><!-- --></A><H3>
  1011. dh</H3>
  1012. <PRE>
  1013. 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>
  1014. <DL>
  1015. <DD>The DataHandler object representing this Message's content.
  1016. <P>
  1017. <DL>
  1018. </DL>
  1019. </DL>
  1020. <HR>
  1021.  
  1022. <A NAME="content"><!-- --></A><H3>
  1023. content</H3>
  1024. <PRE>
  1025. protected byte[] <B>content</B></PRE>
  1026. <DL>
  1027. <DD>Byte array that holds the bytes of this Message's content.
  1028. <P>
  1029. <DL>
  1030. </DL>
  1031. </DL>
  1032. <HR>
  1033.  
  1034. <A NAME="contentStream"><!-- --></A><H3>
  1035. contentStream</H3>
  1036. <PRE>
  1037. 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>
  1038. <DL>
  1039. <DD>If the data for this message was supplied by an
  1040. InputStream that implements the SharedInputStream interface,
  1041. <code>contentStream</code> is another such stream representing
  1042. the content of this message.  In this case, <code>content</code>
  1043. will be null.
  1044. <P>
  1045. <DL>
  1046. <DT><B>Since:</B></DT>
  1047.  <DD>JavaMail 1.2</DD>
  1048. </DL>
  1049. </DL>
  1050. <HR>
  1051.  
  1052. <A NAME="headers"><!-- --></A><H3>
  1053. headers</H3>
  1054. <PRE>
  1055. protected <A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A> <B>headers</B></PRE>
  1056. <DL>
  1057. <DD>The InternetHeaders object that stores the header
  1058. of this message.
  1059. <P>
  1060. <DL>
  1061. </DL>
  1062. </DL>
  1063. <HR>
  1064.  
  1065. <A NAME="flags"><!-- --></A><H3>
  1066. flags</H3>
  1067. <PRE>
  1068. protected <A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>flags</B></PRE>
  1069. <DL>
  1070. <DD>The Flags for this message.
  1071. <P>
  1072. <DL>
  1073. </DL>
  1074. </DL>
  1075. <HR>
  1076.  
  1077. <A NAME="modified"><!-- --></A><H3>
  1078. modified</H3>
  1079. <PRE>
  1080. protected boolean <B>modified</B></PRE>
  1081. <DL>
  1082. <DD>A flag indicating whether the message has been modified.
  1083. If the message has not been modified, any data in the
  1084. <code>content</code> array is assumed to be valid and is used
  1085. directly in the <code>writeTo</code> method.  This flag is
  1086. set to true when an empty message is created or when the
  1087. <code>saveChanges</code> method is called.
  1088. <P>
  1089. <DL>
  1090. <DT><B>Since:</B></DT>
  1091.  <DD>JavaMail 1.2</DD>
  1092. </DL>
  1093. </DL>
  1094. <HR>
  1095.  
  1096. <A NAME="saved"><!-- --></A><H3>
  1097. saved</H3>
  1098. <PRE>
  1099. protected boolean <B>saved</B></PRE>
  1100. <DL>
  1101. <DD>Does the <code>saveChanges</code> method need to be called on
  1102. this message?  This flag is set to false by the public constructor
  1103. and set to true by the <code>saveChanges</code> method.  The
  1104. <code>writeTo</code> method checks this flag and calls the
  1105. <code>saveChanges</code> method as necessary.  This avoids the
  1106. common mistake of forgetting to call the <code>saveChanges</code>
  1107. method on a newly constructed message.
  1108. <P>
  1109. <DL>
  1110. <DT><B>Since:</B></DT>
  1111.  <DD>JavaMail 1.2</DD>
  1112. </DL>
  1113. </DL>
  1114.  
  1115. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  1116.  
  1117. <A NAME="constructor_detail"><!-- --></A>
  1118. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  1119. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  1120. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  1121. <B>Constructor Detail</B></FONT></TH>
  1122. </TR>
  1123. </TABLE>
  1124.  
  1125. <A NAME="MimeMessage(javax.mail.Session)"><!-- --></A><H3>
  1126. MimeMessage</H3>
  1127. <PRE>
  1128. public <B>MimeMessage</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A>&nbsp;session)</PRE>
  1129. <DL>
  1130. <DD>Default constructor. An empty message object is created.
  1131. The <code>headers</code> field is set to an empty InternetHeaders
  1132. object. The <code>flags</code> field is set to an empty Flags
  1133. object. The <code>modified</code> flag is set to true.
  1134. <P>
  1135. </DL>
  1136. <HR>
  1137.  
  1138. <A NAME="MimeMessage(javax.mail.Session, java.io.InputStream)"><!-- --></A><H3>
  1139. MimeMessage</H3>
  1140. <PRE>
  1141. public <B>MimeMessage</B>(<A HREF="../../../javax/mail/Session.html" title="class in javax.mail">Session</A>&nbsp;session,
  1142.                   <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>&nbsp;is)
  1143.            throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1144. <DL>
  1145. <DD>Constructs a MimeMessage by reading and parsing the data from the
  1146. specified MIME InputStream. The InputStream will be left positioned
  1147. at the end of the data for the message. Note that the input stream
  1148. parse is done within this constructor itself. <p>
  1149.  
  1150. The input stream contains an entire MIME formatted message with
  1151. headers and data.
  1152. <P>
  1153. <DL>
  1154. <DT><B>Parameters:</B><DD><CODE>session</CODE> - Session object for this message<DD><CODE>is</CODE> - the message input stream
  1155. <DT><B>Throws:</B>
  1156. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1157. </DL>
  1158. <HR>
  1159.  
  1160. <A NAME="MimeMessage(javax.mail.internet.MimeMessage)"><!-- --></A><H3>
  1161. MimeMessage</H3>
  1162. <PRE>
  1163. public <B>MimeMessage</B>(<A HREF="../../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage</A>&nbsp;source)
  1164.            throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1165. <DL>
  1166. <DD>Constructs a new MimeMessage with content initialized from the
  1167. <code>source</code> MimeMessage.  The new message is independent
  1168. of the original. <p>
  1169.  
  1170. Note: The current implementation is rather inefficient, copying
  1171. the data more times than strictly necessary.
  1172. <P>
  1173. <DL>
  1174. <DT><B>Parameters:</B><DD><CODE>source</CODE> - the message to copy content from
  1175. <DT><B>Throws:</B>
  1176. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  1177.  <DD>JavaMail 1.2</DD>
  1178. </DL>
  1179. </DL>
  1180. <HR>
  1181.  
  1182. <A NAME="MimeMessage(javax.mail.Folder, int)"><!-- --></A><H3>
  1183. MimeMessage</H3>
  1184. <PRE>
  1185. protected <B>MimeMessage</B>(<A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder,
  1186.                      int&nbsp;msgnum)</PRE>
  1187. <DL>
  1188. <DD>Constructs an empty MimeMessage object with the given Folder
  1189. and message number. <p>
  1190.  
  1191. This method is for providers subclassing <code>MimeMessage</code>.
  1192. <P>
  1193. </DL>
  1194. <HR>
  1195.  
  1196. <A NAME="MimeMessage(javax.mail.Folder, java.io.InputStream, int)"><!-- --></A><H3>
  1197. MimeMessage</H3>
  1198. <PRE>
  1199. protected <B>MimeMessage</B>(<A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder,
  1200.                      <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>&nbsp;is,
  1201.                      int&nbsp;msgnum)
  1202.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1203. <DL>
  1204. <DD>Constructs a MimeMessage by reading and parsing the data from the
  1205. specified MIME InputStream. The InputStream will be left positioned
  1206. at the end of the data for the message. Note that the input stream
  1207. parse is done within this constructor itself. <p>
  1208.  
  1209. This method is for providers subclassing <code>MimeMessage</code>.
  1210. <P>
  1211. <DL>
  1212. <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
  1213. <DT><B>Throws:</B>
  1214. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1215. </DL>
  1216. <HR>
  1217.  
  1218. <A NAME="MimeMessage(javax.mail.Folder, javax.mail.internet.InternetHeaders, byte[], int)"><!-- --></A><H3>
  1219. MimeMessage</H3>
  1220. <PRE>
  1221. protected <B>MimeMessage</B>(<A HREF="../../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder,
  1222.                      <A HREF="../../../javax/mail/internet/InternetHeaders.html" title="class in javax.mail.internet">InternetHeaders</A>&nbsp;headers,
  1223.                      byte[]&nbsp;content,
  1224.                      int&nbsp;msgnum)
  1225.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1226. <DL>
  1227. <DD>Constructs a MimeMessage from the given InternetHeaders object
  1228. and content.
  1229.  
  1230. This method is for providers subclassing <code>MimeMessage</code>.
  1231. <P>
  1232. <DL>
  1233. <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
  1234. <DT><B>Throws:</B>
  1235. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1236. </DL>
  1237.  
  1238. <!-- ============ METHOD DETAIL ========== -->
  1239.  
  1240. <A NAME="method_detail"><!-- --></A>
  1241. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  1242. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  1243. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  1244. <B>Method Detail</B></FONT></TH>
  1245. </TR>
  1246. </TABLE>
  1247.  
  1248. <A NAME="parse(java.io.InputStream)"><!-- --></A><H3>
  1249. parse</H3>
  1250. <PRE>
  1251. 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>&nbsp;is)
  1252.              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1253. <DL>
  1254. <DD>Parse the InputStream setting the <code>headers</code> and
  1255. <code>content</code> fields appropriately.  Also resets the
  1256. <code>modified</code> flag. <p>
  1257.  
  1258. This method is intended for use by subclasses that need to
  1259. control when the InputStream is parsed.
  1260. <P>
  1261. <DD><DL>
  1262. </DL>
  1263. </DD>
  1264. <DD><DL>
  1265. <DT><B>Parameters:</B><DD><CODE>is</CODE> - The message input stream
  1266. <DT><B>Throws:</B>
  1267. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1268. </DD>
  1269. </DL>
  1270. <HR>
  1271.  
  1272. <A NAME="getFrom()"><!-- --></A><H3>
  1273. getFrom</H3>
  1274. <PRE>
  1275. public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getFrom</B>()
  1276.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1277. <DL>
  1278. <DD>Returns the value of the RFC 822 "From" header fields. If this
  1279. header field is absent, the "Sender" header field is used.
  1280. If the "Sender" header field is also absent, <code>null</code>
  1281. is returned.<p>
  1282.  
  1283. This implementation uses the <code>getHeader</code> method
  1284. to obtain the requisite header field.
  1285. <P>
  1286. <DD><DL>
  1287. <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>
  1288. </DD>
  1289. <DD><DL>
  1290.  
  1291. <DT><B>Returns:</B><DD>Address object
  1292. <DT><B>Throws:</B>
  1293. <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>
  1294. </DD>
  1295. </DL>
  1296. <HR>
  1297.  
  1298. <A NAME="setFrom(javax.mail.Address)"><!-- --></A><H3>
  1299. setFrom</H3>
  1300. <PRE>
  1301. public void <B>setFrom</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)
  1302.             throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1303. <DL>
  1304. <DD>Set the RFC 822 "From" header field. Any existing values are
  1305. replaced with the given address. If address is <code>null</code>,
  1306. this header is removed.
  1307. <P>
  1308. <DD><DL>
  1309. <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>
  1310. </DD>
  1311. <DD><DL>
  1312. <DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender of this message
  1313. <DT><B>Throws:</B>
  1314. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1315.                        implementation does not support modification
  1316.                        of existing values
  1317. <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
  1318.                        obtained from a READ_ONLY folder.
  1319. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1320. </DD>
  1321. </DL>
  1322. <HR>
  1323.  
  1324. <A NAME="setFrom()"><!-- --></A><H3>
  1325. setFrom</H3>
  1326. <PRE>
  1327. public void <B>setFrom</B>()
  1328.             throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1329. <DL>
  1330. <DD>Set the RFC 822 "From" header field using the value of the
  1331. <code>InternetAddress.getLocalAddress</code> method.
  1332. <P>
  1333. <DD><DL>
  1334. <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>
  1335. </DD>
  1336. <DD><DL>
  1337.  
  1338. <DT><B>Throws:</B>
  1339. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1340.                        implementation does not support modification
  1341.                        of existing values
  1342. <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
  1343.                        obtained from a READ_ONLY folder.
  1344. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1345. </DD>
  1346. </DL>
  1347. <HR>
  1348.  
  1349. <A NAME="addFrom(javax.mail.Address[])"><!-- --></A><H3>
  1350. addFrom</H3>
  1351. <PRE>
  1352. public void <B>addFrom</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  1353.             throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1354. <DL>
  1355. <DD>Add the specified addresses to the existing "From" field. If
  1356. the "From" field does not already exist, it is created.
  1357. <P>
  1358. <DD><DL>
  1359. <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>
  1360. </DD>
  1361. <DD><DL>
  1362. <DT><B>Parameters:</B><DD><CODE>addresses</CODE> - the senders of this message
  1363. <DT><B>Throws:</B>
  1364. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1365.                        implementation does not support modification
  1366.                        of existing values
  1367. <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
  1368.                        obtained from a READ_ONLY folder.
  1369. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1370. </DD>
  1371. </DL>
  1372. <HR>
  1373.  
  1374. <A NAME="getSender()"><!-- --></A><H3>
  1375. getSender</H3>
  1376. <PRE>
  1377. public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A> <B>getSender</B>()
  1378.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1379. <DL>
  1380. <DD>Returns the value of the RFC 822 "Sender" header field.
  1381. If the "Sender" header field is absent, <code>null</code>
  1382. is returned.<p>
  1383.  
  1384. This implementation uses the <code>getHeader</code> method
  1385. to obtain the requisite header field.
  1386. <P>
  1387. <DD><DL>
  1388. </DL>
  1389. </DD>
  1390. <DD><DL>
  1391.  
  1392. <DT><B>Returns:</B><DD>Address object
  1393. <DT><B>Throws:</B>
  1394. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  1395.  <DD>JavaMail 1.3</DD>
  1396. <DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#headers"><CODE>headers</CODE></A></DL>
  1397. </DD>
  1398. </DL>
  1399. <HR>
  1400.  
  1401. <A NAME="setSender(javax.mail.Address)"><!-- --></A><H3>
  1402. setSender</H3>
  1403. <PRE>
  1404. public void <B>setSender</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)
  1405.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1406. <DL>
  1407. <DD>Set the RFC 822 "Sender" header field. Any existing values are
  1408. replaced with the given address. If address is <code>null</code>,
  1409. this header is removed.
  1410. <P>
  1411. <DD><DL>
  1412. </DL>
  1413. </DD>
  1414. <DD><DL>
  1415. <DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender of this message
  1416. <DT><B>Throws:</B>
  1417. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1418.                        implementation does not support modification
  1419.                        of existing values
  1420. <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
  1421.                        obtained from a READ_ONLY folder.
  1422. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  1423.  <DD>JavaMail 1.3</DD>
  1424. </DL>
  1425. </DD>
  1426. </DL>
  1427. <HR>
  1428.  
  1429. <A NAME="getRecipients(javax.mail.Message.RecipientType)"><!-- --></A><H3>
  1430. getRecipients</H3>
  1431. <PRE>
  1432. 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>&nbsp;type)
  1433.                        throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1434. <DL>
  1435. <DD>Returns the recepients specified by the type. The mapping
  1436. between the type and the corresponding RFC 822 header is
  1437. as follows:
  1438. <pre>
  1439.                Message.RecipientType.TO                "To"
  1440.                Message.RecipientType.CC                "Cc"
  1441.                Message.RecipientType.BCC               "Bcc"
  1442.                MimeMessage.RecipientType.NEWSGROUPS    "Newsgroups"
  1443. </pre><br>
  1444.  
  1445. Returns null if the header specified by the type is not found
  1446. or if its value is empty. <p>
  1447.  
  1448. This implementation uses the <code>getHeader</code> method
  1449. to obtain the requisite header field.
  1450. <P>
  1451. <DD><DL>
  1452. <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>
  1453. </DD>
  1454. <DD><DL>
  1455. <DT><B>Parameters:</B><DD><CODE>type</CODE> - Type of recepient
  1456. <DT><B>Returns:</B><DD>array of Address objects
  1457. <DT><B>Throws:</B>
  1458. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if header could not
  1459.                  be retrieved
  1460. <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>,
  1461. <A HREF="../../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>,
  1462. <A HREF="../../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>,
  1463. <A HREF="../../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A>,
  1464. <A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html#NEWSGROUPS"><CODE>MimeMessage.RecipientType.NEWSGROUPS</CODE></A></DL>
  1465. </DD>
  1466. </DL>
  1467. <HR>
  1468.  
  1469. <A NAME="getAllRecipients()"><!-- --></A><H3>
  1470. getAllRecipients</H3>
  1471. <PRE>
  1472. public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getAllRecipients</B>()
  1473.                           throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1474. <DL>
  1475. <DD>Get all the recipient addresses for the message.
  1476. Extracts the TO, CC, BCC, and NEWSGROUPS recipients.
  1477. <P>
  1478. <DD><DL>
  1479. <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>
  1480. </DD>
  1481. <DD><DL>
  1482.  
  1483. <DT><B>Returns:</B><DD>array of Address objects
  1484. <DT><B>Throws:</B>
  1485. <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>,
  1486. <A HREF="../../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>,
  1487. <A HREF="../../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A>,
  1488. <A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html#NEWSGROUPS"><CODE>MimeMessage.RecipientType.NEWSGROUPS</CODE></A></DL>
  1489. </DD>
  1490. </DL>
  1491. <HR>
  1492.  
  1493. <A NAME="setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
  1494. setRecipients</H3>
  1495. <PRE>
  1496. public void <B>setRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  1497.                          <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  1498.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1499. <DL>
  1500. <DD>Set the specified recipient type to the given addresses.
  1501. If the address parameter is <code>null</code>, the corresponding
  1502. recipient field is removed.
  1503. <P>
  1504. <DD><DL>
  1505. <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>
  1506. </DD>
  1507. <DD><DL>
  1508. <DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
  1509. <DT><B>Throws:</B>
  1510. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1511.                        implementation does not support modification
  1512.                        of existing values
  1513. <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
  1514.                        obtained from a READ_ONLY folder.
  1515. <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>
  1516. </DD>
  1517. </DL>
  1518. <HR>
  1519.  
  1520. <A NAME="setRecipients(javax.mail.Message.RecipientType, java.lang.String)"><!-- --></A><H3>
  1521. setRecipients</H3>
  1522. <PRE>
  1523. public void <B>setRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  1524.                          <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>&nbsp;addresses)
  1525.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1526. <DL>
  1527. <DD>Set the specified recipient type to the given addresses.
  1528. If the address parameter is <code>null</code>, the corresponding
  1529. recipient field is removed.
  1530. <P>
  1531. <DD><DL>
  1532. </DL>
  1533. </DD>
  1534. <DD><DL>
  1535. <DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
  1536. <DT><B>Throws:</B>
  1537. <DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the attempt to parse the
  1538.                  addresses String fails
  1539. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1540.                  implementation does not support modification
  1541.                  of existing values
  1542. <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
  1543.                  obtained from a READ_ONLY folder.
  1544. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  1545.  <DD>JavaMail 1.2</DD>
  1546. <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>
  1547. </DD>
  1548. </DL>
  1549. <HR>
  1550.  
  1551. <A NAME="addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
  1552. addRecipients</H3>
  1553. <PRE>
  1554. public void <B>addRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  1555.                          <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  1556.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1557. <DL>
  1558. <DD>Add the given addresses to the specified recipient type.
  1559. <P>
  1560. <DD><DL>
  1561. <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>
  1562. </DD>
  1563. <DD><DL>
  1564. <DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
  1565. <DT><B>Throws:</B>
  1566. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1567.                        implementation does not support modification
  1568.                        of existing values
  1569. <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
  1570.                        obtained from a READ_ONLY folder.
  1571. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1572. </DD>
  1573. </DL>
  1574. <HR>
  1575.  
  1576. <A NAME="addRecipients(javax.mail.Message.RecipientType, java.lang.String)"><!-- --></A><H3>
  1577. addRecipients</H3>
  1578. <PRE>
  1579. public void <B>addRecipients</B>(<A HREF="../../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  1580.                          <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>&nbsp;addresses)
  1581.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1582. <DL>
  1583. <DD>Add the given addresses to the specified recipient type.
  1584. <P>
  1585. <DD><DL>
  1586. </DL>
  1587. </DD>
  1588. <DD><DL>
  1589. <DT><B>Parameters:</B><DD><CODE>type</CODE> - Recipient type<DD><CODE>addresses</CODE> - Addresses
  1590. <DT><B>Throws:</B>
  1591. <DD><CODE><A HREF="../../../javax/mail/internet/AddressException.html" title="class in javax.mail.internet">AddressException</A></CODE> - if the attempt to parse the
  1592.                  addresses String fails
  1593. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1594.                  implementation does not support modification
  1595.                  of existing values
  1596. <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
  1597.                  obtained from a READ_ONLY folder.
  1598. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  1599.  <DD>JavaMail 1.2</DD>
  1600. </DL>
  1601. </DD>
  1602. </DL>
  1603. <HR>
  1604.  
  1605. <A NAME="getReplyTo()"><!-- --></A><H3>
  1606. getReplyTo</H3>
  1607. <PRE>
  1608. public <A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getReplyTo</B>()
  1609.                     throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1610. <DL>
  1611. <DD>Return the value of the RFC 822 "Reply-To" header field. If
  1612. this header is unavailable or its value is absent, then
  1613. the <code>getFrom</code> method is called and its value is returned.
  1614.  
  1615. This implementation uses the <code>getHeader</code> method
  1616. to obtain the requisite header field.
  1617. <P>
  1618. <DD><DL>
  1619. <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>
  1620. </DD>
  1621. <DD><DL>
  1622.  
  1623. <DT><B>Returns:</B><DD>addresses to which replies should be directed
  1624. <DT><B>Throws:</B>
  1625. <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>
  1626. </DD>
  1627. </DL>
  1628. <HR>
  1629.  
  1630. <A NAME="setReplyTo(javax.mail.Address[])"><!-- --></A><H3>
  1631. setReplyTo</H3>
  1632. <PRE>
  1633. public void <B>setReplyTo</B>(<A HREF="../../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  1634.                throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1635. <DL>
  1636. <DD>Set the RFC 822 "Reply-To" header field. If the address
  1637. parameter is <code>null</code>, this header is removed.
  1638. <P>
  1639. <DD><DL>
  1640. <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>
  1641. </DD>
  1642. <DD><DL>
  1643. <DT><B>Parameters:</B><DD><CODE>addresses</CODE> - addresses to which replies should be directed
  1644. <DT><B>Throws:</B>
  1645. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1646.                        implementation does not support modification
  1647.                        of existing values
  1648. <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
  1649.                        obtained from a READ_ONLY folder.
  1650. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  1651. <DD><CODE><A HREF="../../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail">MethodNotSupportedException</A></CODE> - if the underlying
  1652.                        implementation does not support setting this
  1653.                        attribute</DL>
  1654. </DD>
  1655. </DL>
  1656. <HR>
  1657.  
  1658. <A NAME="getSubject()"><!-- --></A><H3>
  1659. getSubject</H3>
  1660. <PRE>
  1661. 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>()
  1662.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1663. <DL>
  1664. <DD>Returns the value of the "Subject" header field. Returns null
  1665. if the subject field is unavailable or its value is absent. <p>
  1666.  
  1667. If the subject is encoded as per RFC 2047, it is decoded and
  1668. converted into Unicode. If the decoding or conversion fails, the
  1669. raw data is returned as is. <p>
  1670.  
  1671. This implementation uses the <code>getHeader</code> method
  1672. to obtain the requisite header field.
  1673. <P>
  1674. <DD><DL>
  1675. <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>
  1676. </DD>
  1677. <DD><DL>
  1678.  
  1679. <DT><B>Returns:</B><DD>Subject
  1680. <DT><B>Throws:</B>
  1681. <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>
  1682. </DD>
  1683. </DL>
  1684. <HR>
  1685.  
  1686. <A NAME="setSubject(java.lang.String)"><!-- --></A><H3>
  1687. setSubject</H3>
  1688. <PRE>
  1689. 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>&nbsp;subject)
  1690.                throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1691. <DL>
  1692. <DD>Set the "Subject" header field. If the subject contains
  1693. non US-ASCII characters, it will be encoded using the
  1694. platform's default charset. If the subject contains only
  1695.  US-ASCII characters, no encoding is done and it is used
  1696.  as-is. If the subject is null, the existing "Subject" field
  1697.  is removed. <p>
  1698.  
  1699.  The application must ensure that the subject does not contain
  1700.  any line breaks. <p>
  1701.  
  1702.  Note that if the charset encoding process fails, a
  1703.  MessagingException is thrown, and an UnsupportedEncodingException
  1704.  is included in the chain of nested exceptions within the
  1705.  MessagingException.
  1706. <P>
  1707. <DD><DL>
  1708. <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>
  1709. </DD>
  1710. <DD><DL>
  1711. <DT><B>Parameters:</B><DD><CODE>subject</CODE> - The subject
  1712. <DT><B>Throws:</B>
  1713. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1714.                         implementation does not support modification
  1715.                         of existing values
  1716. <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
  1717.                         obtained from a READ_ONLY folder.
  1718. <DD><CODE>MessagingException.</CODE> - An
  1719.                         UnsupportedEncodingException may be included
  1720.                         in the exception chain if the charset
  1721.                         conversion fails.
  1722. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1723. </DD>
  1724. </DL>
  1725. <HR>
  1726.  
  1727. <A NAME="setSubject(java.lang.String, java.lang.String)"><!-- --></A><H3>
  1728. setSubject</H3>
  1729. <PRE>
  1730. 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>&nbsp;subject,
  1731.                        <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>&nbsp;charset)
  1732.                 throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1733. <DL>
  1734. <DD>Set the "Subject" header field. If the subject contains non
  1735.  US-ASCII characters, it will be encoded using the specified
  1736.  charset. If the subject contains only US-ASCII characters, no
  1737.  encoding is done and it is used as-is. If the subject is null,
  1738.  the existing "Subject" header field is removed. <p>
  1739.  
  1740.  The application must ensure that the subject does not contain
  1741.  any line breaks. <p>
  1742.  
  1743.  Note that if the charset encoding process fails, a
  1744.  MessagingException is thrown, and an UnsupportedEncodingException
  1745.  is included in the chain of nested exceptions within the
  1746.  MessagingException.
  1747. <P>
  1748. <DD><DL>
  1749. </DL>
  1750. </DD>
  1751. <DD><DL>
  1752. <DT><B>Parameters:</B><DD><CODE>subject</CODE> - The subject<DD><CODE>charset</CODE> - The charset
  1753. <DT><B>Throws:</B>
  1754. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1755.                                 implementation does not support modification
  1756.                                 of existing values
  1757. <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
  1758.                                 obtained from a READ_ONLY folder.
  1759. <DD><CODE>MessagingException.</CODE> - An
  1760.                                 UnsupportedEncodingException may be included
  1761.                                 in the exception chain if the charset
  1762.                                 conversion fails.
  1763. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1764. </DD>
  1765. </DL>
  1766. <HR>
  1767.  
  1768. <A NAME="getSentDate()"><!-- --></A><H3>
  1769. getSentDate</H3>
  1770. <PRE>
  1771. 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>()
  1772.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1773. <DL>
  1774. <DD>Returns the value of the RFC 822 "Date" field. This is the date
  1775.  on which this message was sent. Returns null if this field is
  1776.  unavailable or its value is absent. <p>
  1777.  
  1778.  This implementation uses the <code>getHeader</code> method
  1779.  to obtain the requisite header field.
  1780. <P>
  1781. <DD><DL>
  1782. <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>
  1783. </DD>
  1784. <DD><DL>
  1785.  
  1786. <DT><B>Returns:</B><DD>The sent Date
  1787. <DT><B>Throws:</B>
  1788. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1789. </DD>
  1790. </DL>
  1791. <HR>
  1792.  
  1793. <A NAME="setSentDate(java.util.Date)"><!-- --></A><H3>
  1794. setSentDate</H3>
  1795. <PRE>
  1796. 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>&nbsp;d)
  1797.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1798. <DL>
  1799. <DD>Set the RFC 822 "Date" header field. This is the date on which the
  1800.  creator of the message indicates that the message is complete
  1801.  and ready for delivery. If the date parameter is
  1802.  <code>null</code>, the existing "Date" field is removed.
  1803. <P>
  1804. <DD><DL>
  1805. <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>
  1806. </DD>
  1807. <DD><DL>
  1808. <DT><B>Parameters:</B><DD><CODE>d</CODE> - the sent date of this message
  1809. <DT><B>Throws:</B>
  1810. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1811.                         implementation does not support modification
  1812. <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
  1813.                         obtained from a READ_ONLY folder.
  1814. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1815. </DD>
  1816. </DL>
  1817. <HR>
  1818.  
  1819. <A NAME="getReceivedDate()"><!-- --></A><H3>
  1820. getReceivedDate</H3>
  1821. <PRE>
  1822. 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>()
  1823.                      throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1824. <DL>
  1825. <DD>Returns the Date on this message was received. Returns
  1826.  <code>null</code> if this date cannot be obtained. <p>
  1827.  
  1828.  Note that RFC 822 does not define a field for the received
  1829.  date. Hence only implementations that can provide this date
  1830.  need return a valid value. <p>
  1831.  
  1832.  This implementation returns <code>null</code>.
  1833. <P>
  1834. <DD><DL>
  1835. <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>
  1836. </DD>
  1837. <DD><DL>
  1838.  
  1839. <DT><B>Returns:</B><DD>the date this message was received
  1840. <DT><B>Throws:</B>
  1841. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1842. </DD>
  1843. </DL>
  1844. <HR>
  1845.  
  1846. <A NAME="getSize()"><!-- --></A><H3>
  1847. getSize</H3>
  1848. <PRE>
  1849. public int <B>getSize</B>()
  1850.             throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1851. <DL>
  1852. <DD>Return the size of the content of this message in bytes.
  1853.  Return -1 if the size cannot be determined. <p>
  1854.  
  1855.  Note that this number may not be an exact measure of the
  1856.  content size and may or may not account for any transfer
  1857.  encoding of the content. <p>
  1858.  
  1859.  This implementation returns the size of the <code>content</code>
  1860.  array (if not null), or, if <code>contentStream</code> is not
  1861.  null, and the <code>available</code> method returns a positive
  1862.  number, it returns that number as the size.  Otherwise, it returns
  1863.  -1.
  1864. <P>
  1865. <DD><DL>
  1866. <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>
  1867. </DD>
  1868. <DD><DL>
  1869.  
  1870. <DT><B>Returns:</B><DD>size of content in bytes
  1871. <DT><B>Throws:</B>
  1872. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1873. </DD>
  1874. </DL>
  1875. <HR>
  1876.  
  1877. <A NAME="getLineCount()"><!-- --></A><H3>
  1878. getLineCount</H3>
  1879. <PRE>
  1880. public int <B>getLineCount</B>()
  1881.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1882. <DL>
  1883. <DD>Return the number of lines for the content of this message.
  1884.  Return -1 if this number cannot be determined. <p>
  1885.  
  1886.  Note that this number may not be an exact measure of the
  1887.  content length and may or may not account for any transfer
  1888.  encoding of the content. <p>
  1889.  
  1890.  This implementation returns -1.
  1891. <P>
  1892. <DD><DL>
  1893. <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>
  1894. </DD>
  1895. <DD><DL>
  1896.  
  1897. <DT><B>Returns:</B><DD>number of lines in the content.
  1898. <DT><B>Throws:</B>
  1899. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1900. </DD>
  1901. </DL>
  1902. <HR>
  1903.  
  1904. <A NAME="getContentType()"><!-- --></A><H3>
  1905. getContentType</H3>
  1906. <PRE>
  1907. 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>()
  1908.                       throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1909. <DL>
  1910. <DD>Returns the value of the RFC 822 "Content-Type" header field.
  1911.  This represents the content-type of the content of this
  1912.  message. This value must not be null. If this field is
  1913.  unavailable, "text/plain" should be returned. <p>
  1914.  
  1915.  This implementation uses the <code>getHeader</code> method
  1916.  to obtain the requisite header field.
  1917. <P>
  1918. <DD><DL>
  1919. <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>
  1920. </DD>
  1921. <DD><DL>
  1922.  
  1923. <DT><B>Returns:</B><DD>The ContentType of this part
  1924. <DT><B>Throws:</B>
  1925. <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>
  1926. </DD>
  1927. </DL>
  1928. <HR>
  1929.  
  1930. <A NAME="isMimeType(java.lang.String)"><!-- --></A><H3>
  1931. isMimeType</H3>
  1932. <PRE>
  1933. 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>&nbsp;mimeType)
  1934.                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1935. <DL>
  1936. <DD>Is this Part of the specified MIME type?  This method
  1937.  compares <strong>only the <code>primaryType</code> and
  1938.  <code>subType</code></strong>.
  1939.  The parameters of the content types are ignored. <p>
  1940.  
  1941.  For example, this method will return <code>true</code> when
  1942.  comparing a Part of content type <strong>"text/plain"</strong>
  1943.  with <strong>"text/plain; charset=foobar"</strong>. <p>
  1944.  
  1945.  If the <code>subType</code> of <code>mimeType</code> is the
  1946.  special character '*', then the subtype is ignored during the
  1947.  comparison.
  1948. <P>
  1949. <DD><DL>
  1950. <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>
  1951. </DD>
  1952. <DD><DL>
  1953.  
  1954. <DT><B>Throws:</B>
  1955. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1956. </DD>
  1957. </DL>
  1958. <HR>
  1959.  
  1960. <A NAME="getDisposition()"><!-- --></A><H3>
  1961. getDisposition</H3>
  1962. <PRE>
  1963. 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>()
  1964.                       throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1965. <DL>
  1966. <DD>Returns the value of the "Content-Disposition" header field.
  1967.  This represents the disposition of this part. The disposition
  1968.  describes how the part should be presented to the user. <p>
  1969.  
  1970.  If the Content-Disposition field is unavailable,
  1971.  <code>null</code> is returned. <p>
  1972.  
  1973.  This implementation uses the <code>getHeader</code> method
  1974.  to obtain the requisite header field.
  1975. <P>
  1976. <DD><DL>
  1977. <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>
  1978. </DD>
  1979. <DD><DL>
  1980.  
  1981. <DT><B>Returns:</B><DD>disposition of this part, or null if unknown
  1982. <DT><B>Throws:</B>
  1983. <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>,
  1984. <A HREF="../../../javax/mail/Part.html#INLINE"><CODE>Part.INLINE</CODE></A>,
  1985. <A HREF="../../../javax/mail/Part.html#getFileName()"><CODE>Part.getFileName()</CODE></A></DL>
  1986. </DD>
  1987. </DL>
  1988. <HR>
  1989.  
  1990. <A NAME="setDisposition(java.lang.String)"><!-- --></A><H3>
  1991. setDisposition</H3>
  1992. <PRE>
  1993. 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>&nbsp;disposition)
  1994.                     throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1995. <DL>
  1996. <DD>Set the "Content-Disposition" header field of this Message.
  1997.  If <code>disposition</code> is null, any existing "Content-Disposition"
  1998.  header field is removed.
  1999. <P>
  2000. <DD><DL>
  2001. <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>
  2002. </DD>
  2003. <DD><DL>
  2004. <DT><B>Parameters:</B><DD><CODE>disposition</CODE> - disposition of this part
  2005. <DT><B>Throws:</B>
  2006. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2007.                         implementation does not support modification
  2008. <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
  2009.                         obtained from a READ_ONLY folder.
  2010. <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>,
  2011. <A HREF="../../../javax/mail/Part.html#INLINE"><CODE>Part.INLINE</CODE></A>,
  2012. <A HREF="../../../javax/mail/Part.html#setFileName(java.lang.String)"><CODE>Part.setFileName(java.lang.String)</CODE></A></DL>
  2013. </DD>
  2014. </DL>
  2015. <HR>
  2016.  
  2017. <A NAME="getEncoding()"><!-- --></A><H3>
  2018. getEncoding</H3>
  2019. <PRE>
  2020. 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>()
  2021.                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2022. <DL>
  2023. <DD>Returns the content transfer encoding from the
  2024.  "Content-Transfer-Encoding" header
  2025.  field. Returns <code>null</code> if the header is unavailable
  2026.  or its value is absent. <p>
  2027.  
  2028.  This implementation uses the <code>getHeader</code> method
  2029.  to obtain the requisite header field.
  2030. <P>
  2031. <DD><DL>
  2032. <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>
  2033. </DD>
  2034. <DD><DL>
  2035.  
  2036. <DT><B>Returns:</B><DD>content-transfer-encoding
  2037. <DT><B>Throws:</B>
  2038. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2039. </DD>
  2040. </DL>
  2041. <HR>
  2042.  
  2043. <A NAME="getContentID()"><!-- --></A><H3>
  2044. getContentID</H3>
  2045. <PRE>
  2046. 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>()
  2047.                     throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2048. <DL>
  2049. <DD>Returns the value of the "Content-ID" header field. Returns
  2050.  <code>null</code> if the field is unavailable or its value is
  2051.  absent. <p>
  2052.  
  2053.  This implementation uses the <code>getHeader</code> method
  2054.  to obtain the requisite header field.
  2055. <P>
  2056. <DD><DL>
  2057. <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>
  2058. </DD>
  2059. <DD><DL>
  2060.  
  2061. <DT><B>Returns:</B><DD>content-ID
  2062. <DT><B>Throws:</B>
  2063. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2064. </DD>
  2065. </DL>
  2066. <HR>
  2067.  
  2068. <A NAME="setContentID(java.lang.String)"><!-- --></A><H3>
  2069. setContentID</H3>
  2070. <PRE>
  2071. 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>&nbsp;cid)
  2072.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2073. <DL>
  2074. <DD>Set the "Content-ID" header field of this Message.
  2075.  If the <code>cid</code> parameter is null, any existing
  2076.  "Content-ID" is removed.
  2077. <P>
  2078. <DD><DL>
  2079. </DL>
  2080. </DD>
  2081. <DD><DL>
  2082.  
  2083. <DT><B>Throws:</B>
  2084. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2085.                         implementation does not support modification
  2086. <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
  2087.                         obtained from a READ_ONLY folder.
  2088. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2089. </DD>
  2090. </DL>
  2091. <HR>
  2092.  
  2093. <A NAME="getContentMD5()"><!-- --></A><H3>
  2094. getContentMD5</H3>
  2095. <PRE>
  2096. 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>()
  2097.                      throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2098. <DL>
  2099. <DD>Return the value of the "Content-MD5" header field. Returns
  2100.  <code>null</code> if this field is unavailable or its value
  2101.  is absent. <p>
  2102.  
  2103.  This implementation uses the <code>getHeader</code> method
  2104.  to obtain the requisite header field.
  2105. <P>
  2106. <DD><DL>
  2107. <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>
  2108. </DD>
  2109. <DD><DL>
  2110.  
  2111. <DT><B>Returns:</B><DD>content-MD5
  2112. <DT><B>Throws:</B>
  2113. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2114. </DD>
  2115. </DL>
  2116. <HR>
  2117.  
  2118. <A NAME="setContentMD5(java.lang.String)"><!-- --></A><H3>
  2119. setContentMD5</H3>
  2120. <PRE>
  2121. 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>&nbsp;md5)
  2122.                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2123. <DL>
  2124. <DD>Set the "Content-MD5" header field of this Message.
  2125. <P>
  2126. <DD><DL>
  2127. <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>
  2128. </DD>
  2129. <DD><DL>
  2130. <DT><B>Parameters:</B><DD><CODE>md5</CODE> - the MD5 value
  2131. <DT><B>Throws:</B>
  2132. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2133.                         implementation does not support modification
  2134. <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
  2135.                         obtained from a READ_ONLY folder.
  2136. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2137. </DD>
  2138. </DL>
  2139. <HR>
  2140.  
  2141. <A NAME="getDescription()"><!-- --></A><H3>
  2142. getDescription</H3>
  2143. <PRE>
  2144. 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>()
  2145.                       throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2146. <DL>
  2147. <DD>Returns the "Content-Description" header field of this Message.
  2148.  This typically associates some descriptive information with
  2149.  this part. Returns null if this field is unavailable or its
  2150.  value is absent. <p>
  2151.  
  2152.  If the Content-Description field is encoded as per RFC 2047,
  2153.  it is decoded and converted into Unicode. If the decoding or
  2154.  conversion fails, the raw data is returned as-is <p>
  2155.  
  2156.  This implementation uses the <code>getHeader</code> method
  2157.  to obtain the requisite header field.
  2158. <P>
  2159. <DD><DL>
  2160. <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>
  2161. </DD>
  2162. <DD><DL>
  2163.  
  2164. <DT><B>Returns:</B><DD>content-description
  2165. <DT><B>Throws:</B>
  2166. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2167. </DD>
  2168. </DL>
  2169. <HR>
  2170.  
  2171. <A NAME="setDescription(java.lang.String)"><!-- --></A><H3>
  2172. setDescription</H3>
  2173. <PRE>
  2174. 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>&nbsp;description)
  2175.                     throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2176. <DL>
  2177. <DD>Set the "Content-Description" header field for this Message.
  2178.  If the description parameter is <code>null</code>, then any
  2179.  existing "Content-Description" fields are removed. <p>
  2180.  
  2181.  If the description contains non US-ASCII characters, it will
  2182.  be encoded using the platform's default charset. If the
  2183. description contains only US-ASCII characters, no encoding
  2184. is done and it is used as-is. <p>
  2185.  
  2186. Note that if the charset encoding process fails, a
  2187. MessagingException is thrown, and an UnsupportedEncodingException
  2188. is included in the chain of nested exceptions within the
  2189. MessagingException.
  2190. <P>
  2191. <DD><DL>
  2192. <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>
  2193. </DD>
  2194. <DD><DL>
  2195. <DT><B>Parameters:</B><DD><CODE>description</CODE> - content-description
  2196. <DT><B>Throws:</B>
  2197. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2198.                        implementation does not support modification
  2199. <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
  2200.                        obtained from a READ_ONLY folder.
  2201. <DD><CODE>MessagingException.</CODE> - An
  2202.                        UnsupportedEncodingException may be included
  2203.                        in the exception chain if the charset
  2204.                        conversion fails.
  2205. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2206. </DD>
  2207. </DL>
  2208. <HR>
  2209.  
  2210. <A NAME="setDescription(java.lang.String, java.lang.String)"><!-- --></A><H3>
  2211. setDescription</H3>
  2212. <PRE>
  2213. 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>&nbsp;description,
  2214.                           <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>&nbsp;charset)
  2215.                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2216. <DL>
  2217. <DD>Set the "Content-Description" header field for this Message.
  2218. If the description parameter is <code>null</code>, then any
  2219. existing "Content-Description" fields are removed. <p>
  2220.  
  2221. If the description contains non US-ASCII characters, it will
  2222. be encoded using the specified charset. If the description
  2223. contains only US-ASCII characters, no encoding  is done and
  2224. it is used as-is. <p>
  2225.  
  2226. Note that if the charset encoding process fails, a
  2227. MessagingException is thrown, and an UnsupportedEncodingException
  2228. is included in the chain of nested exceptions within the
  2229. MessagingException.
  2230. <P>
  2231. <DD><DL>
  2232. </DL>
  2233. </DD>
  2234. <DD><DL>
  2235. <DT><B>Parameters:</B><DD><CODE>description</CODE> - Description<DD><CODE>charset</CODE> - Charset for encoding
  2236. <DT><B>Throws:</B>
  2237. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2238.                                implementation does not support modification
  2239. <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
  2240.                                obtained from a READ_ONLY folder.
  2241. <DD><CODE>MessagingException.</CODE> - An
  2242.                                UnsupportedEncodingException may be included
  2243.                                in the exception chain if the charset
  2244.                                conversion fails.
  2245. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2246. </DD>
  2247. </DL>
  2248. <HR>
  2249.  
  2250. <A NAME="getContentLanguage()"><!-- --></A><H3>
  2251. getContentLanguage</H3>
  2252. <PRE>
  2253. 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>()
  2254.                            throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2255. <DL>
  2256. <DD>Get the languages specified in the "Content-Language" header
  2257. field of this message. The Content-Language header is defined by
  2258. RFC 1766. Returns <code>null</code> if this field is unavailable
  2259. or its value is absent. <p>
  2260.  
  2261. This implementation uses the <code>getHeader</code> method
  2262. to obtain the requisite header field.
  2263. <P>
  2264. <DD><DL>
  2265. <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>
  2266. </DD>
  2267. <DD><DL>
  2268.  
  2269. <DT><B>Returns:</B><DD>value of content-language header.
  2270. <DT><B>Throws:</B>
  2271. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2272. </DD>
  2273. </DL>
  2274. <HR>
  2275.  
  2276. <A NAME="setContentLanguage(java.lang.String[])"><!-- --></A><H3>
  2277. setContentLanguage</H3>
  2278. <PRE>
  2279. 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>[]&nbsp;languages)
  2280.                        throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2281. <DL>
  2282. <DD>Set the "Content-Language" header of this MimePart. The
  2283. Content-Language header is defined by RFC 1766.
  2284. <P>
  2285. <DD><DL>
  2286. <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>
  2287. </DD>
  2288. <DD><DL>
  2289. <DT><B>Parameters:</B><DD><CODE>languages</CODE> - array of language tags
  2290. <DT><B>Throws:</B>
  2291. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2292.                                implementation does not support modification
  2293. <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
  2294.                                obtained from a READ_ONLY folder.
  2295. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2296. </DD>
  2297. </DL>
  2298. <HR>
  2299.  
  2300. <A NAME="getMessageID()"><!-- --></A><H3>
  2301. getMessageID</H3>
  2302. <PRE>
  2303. 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>()
  2304.                    throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2305. <DL>
  2306. <DD>Returns the value of the "Message-ID" header field. Returns
  2307. null if this field is unavailable or its value is absent. <p>
  2308.  
  2309. The default implementation provided here uses the
  2310. <code>getHeader</code> method to return the value of the
  2311. "Message-ID" field.
  2312. <P>
  2313. <DD><DL>
  2314. </DL>
  2315. </DD>
  2316. <DD><DL>
  2317.  
  2318. <DT><B>Returns:</B><DD>Message-ID
  2319. <DT><B>Throws:</B>
  2320. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if the retrieval of this field
  2321.                        causes any exception.<DT><B>Since:</B></DT>
  2322.  <DD>JavaMail 1.1</DD>
  2323. <DT><B>See Also:</B><DD><A HREF="../../../javax/mail/search/MessageIDTerm.html" title="class in javax.mail.search"><CODE>MessageIDTerm</CODE></A></DL>
  2324. </DD>
  2325. </DL>
  2326. <HR>
  2327.  
  2328. <A NAME="getFileName()"><!-- --></A><H3>
  2329. getFileName</H3>
  2330. <PRE>
  2331. 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>()
  2332.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2333. <DL>
  2334. <DD>Get the filename associated with this Message. <p>
  2335.  
  2336. Returns the value of the "filename" parameter from the
  2337. "Content-Disposition" header field of this message. If it's
  2338.  not available, returns the value of the "name" parameter from
  2339.  the "Content-Type" header field of this BodyPart.
  2340.  Returns <code>null</code> if both are absent. <p>
  2341.  
  2342.  If the <code>mail.mime.encodefilename</code> System property
  2343.  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
  2344.  filename.  While such encoding is not supported by the MIME
  2345.  spec, many mailers use this technique to support non-ASCII
  2346.  characters in filenames.  The default value of this property
  2347.  is false.
  2348. <P>
  2349. <DD><DL>
  2350. <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>
  2351. </DD>
  2352. <DD><DL>
  2353.  
  2354. <DT><B>Returns:</B><DD>filename
  2355. <DT><B>Throws:</B>
  2356. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2357. </DD>
  2358. </DL>
  2359. <HR>
  2360.  
  2361. <A NAME="setFileName(java.lang.String)"><!-- --></A><H3>
  2362. setFileName</H3>
  2363. <PRE>
  2364. 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>&nbsp;filename)
  2365.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2366. <DL>
  2367. <DD>Set the filename associated with this part, if possible. <p>
  2368.  
  2369.  Sets the "filename" parameter of the "Content-Disposition"
  2370.  header field of this message. <p>
  2371.  
  2372.  If the <code>mail.mime.encodefilename</code> System property
  2373.  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
  2374.  filename.  While such encoding is not supported by the MIME
  2375.  spec, many mailers use this technique to support non-ASCII
  2376.  characters in filenames.  The default value of this property
  2377.  is false.
  2378. <P>
  2379. <DD><DL>
  2380. <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>
  2381. </DD>
  2382. <DD><DL>
  2383. <DT><B>Parameters:</B><DD><CODE>filename</CODE> - Filename to associate with this part
  2384. <DT><B>Throws:</B>
  2385. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2386.                                 implementation does not support modification
  2387. <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
  2388.                                 obtained from a READ_ONLY folder.
  2389. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2390. </DD>
  2391. </DL>
  2392. <HR>
  2393.  
  2394. <A NAME="getInputStream()"><!-- --></A><H3>
  2395. getInputStream</H3>
  2396. <PRE>
  2397. 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>()
  2398.                            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>,
  2399.                                   <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2400. <DL>
  2401. <DD>Return a decoded input stream for this Message's "content". <p>
  2402.  
  2403. This implementation obtains the input stream from the DataHandler,
  2404. that is, it invokes <code>getDataHandler().getInputStream()</code>.
  2405. <P>
  2406. <DD><DL>
  2407. <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>
  2408. </DD>
  2409. <DD><DL>
  2410.  
  2411. <DT><B>Returns:</B><DD>an InputStream
  2412. <DT><B>Throws:</B>
  2413. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  2414. <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
  2415.                        DataHandler. Refer to the documentation for
  2416.                        javax.activation.DataHandler for more details.<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#getContentStream()"><CODE>getContentStream()</CODE></A>,
  2417. <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>
  2418. </DD>
  2419. </DL>
  2420. <HR>
  2421.  
  2422. <A NAME="getContentStream()"><!-- --></A><H3>
  2423. getContentStream</H3>
  2424. <PRE>
  2425. 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>()
  2426.                                throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2427. <DL>
  2428. <DD>Produce the raw bytes of the content. This method is used during
  2429. parsing, to create a DataHandler object for the content. Subclasses
  2430. that can provide a separate input stream for just the message
  2431. content might want to override this method. <p>
  2432.  
  2433. This implementation returns a SharedInputStream, if
  2434. <code>contentStream</code> is not null.  Otherwise, it
  2435. returns a ByteArrayInputStream constructed
  2436. out of the <code>content</code> byte array.
  2437. <P>
  2438. <DD><DL>
  2439. </DL>
  2440. </DD>
  2441. <DD><DL>
  2442.  
  2443. <DT><B>Throws:</B>
  2444. <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>
  2445. </DD>
  2446. </DL>
  2447. <HR>
  2448.  
  2449. <A NAME="getRawInputStream()"><!-- --></A><H3>
  2450. getRawInputStream</H3>
  2451. <PRE>
  2452. 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>()
  2453.                              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2454. <DL>
  2455. <DD>Return an InputStream to the raw data with any Content-Transfer-Encoding
  2456. intact.  This method is useful if the "Content-Transfer-Encoding"
  2457. header is incorrect or corrupt, which would prevent the
  2458. <code>getInputStream</code> method or <code>getContent</code> method
  2459. from returning the correct data.  In such a case the application may
  2460. use this method and attempt to decode the raw data itself. <p>
  2461.  
  2462. This implementation simply calls the <code>getContentStream</code>
  2463. method.
  2464. <P>
  2465. <DD><DL>
  2466. </DL>
  2467. </DD>
  2468. <DD><DL>
  2469.  
  2470. <DT><B>Throws:</B>
  2471. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  2472.  <DD>JavaMail 1.2</DD>
  2473. <DT><B>See Also:</B><DD><A HREF="../../../javax/mail/internet/MimeMessage.html#getInputStream()"><CODE>getInputStream()</CODE></A>,
  2474. <A HREF="../../../javax/mail/internet/MimeMessage.html#getContentStream()"><CODE>getContentStream()</CODE></A></DL>
  2475. </DD>
  2476. </DL>
  2477. <HR>
  2478.  
  2479. <A NAME="getDataHandler()"><!-- --></A><H3>
  2480. getDataHandler</H3>
  2481. <PRE>
  2482. 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>()
  2483.                           throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2484. <DL>
  2485. <DD>Return a DataHandler for this Message's content. <p>
  2486.  
  2487.  The implementation provided here works as follows. Note the use of
  2488.  the <code>getContentStream</code> method to
  2489.  generate the byte stream for the content. Also note that
  2490.  any transfer-decoding is done automatically within this method.<p>
  2491.  
  2492.  <blockquote><pre>
  2493.   getDataHandler() {
  2494.       if (dh == null) {
  2495.           dh = new DataHandler(new MimePartDataSource(this));
  2496.       }
  2497.       return dh;
  2498.   }
  2499.   <p>
  2500.   class MimePartDataSource implements DataSource {
  2501.       public getInputStream() {
  2502.           return MimeUtility.decode(
  2503.                      getContentStream(), getEncoding());
  2504.       }
  2505.        
  2506.                 .... <other DataSource methods>
  2507.   }
  2508.  </pre></blockquote><p>
  2509. <P>
  2510. <DD><DL>
  2511. <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>
  2512. </DD>
  2513. <DD><DL>
  2514.  
  2515. <DT><B>Returns:</B><DD>DataHandler for the content
  2516. <DT><B>Throws:</B>
  2517. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2518. </DD>
  2519. </DL>
  2520. <HR>
  2521.  
  2522. <A NAME="getContent()"><!-- --></A><H3>
  2523. getContent</H3>
  2524. <PRE>
  2525. 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>()
  2526.                   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>,
  2527.                          <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2528. <DL>
  2529. <DD>Return the content as a Java object. The type of this
  2530.  object is dependent on the content itself. For
  2531.  example, the native format of a "text/plain" content
  2532.  is usually a String object. The native format for a "multipart"
  2533.  message is always a Multipart subclass. For content types that are
  2534.  unknown to the DataHandler system, an input stream is returned
  2535.  as the content. <p>
  2536.  
  2537.  This implementation obtains the content from the DataHandler,
  2538.  that is, it invokes <code>getDataHandler().getContent()</code>.
  2539.  If the content is a Multipart or Message object and was created by
  2540.  parsing a stream, the object is cached and returned in subsequent
  2541.  calls so that modifications to the content will not be lost.
  2542. <P>
  2543. <DD><DL>
  2544. <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>
  2545. </DD>
  2546. <DD><DL>
  2547.  
  2548. <DT><B>Returns:</B><DD>Object
  2549. <DT><B>Throws:</B>
  2550. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  2551. <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
  2552.                         DataHandler. Refer to the documentation for
  2553.                         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>,
  2554. <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>
  2555. </DD>
  2556. </DL>
  2557. <HR>
  2558.  
  2559. <A NAME="setDataHandler(javax.activation.DataHandler)"><!-- --></A><H3>
  2560. setDataHandler</H3>
  2561. <PRE>
  2562. 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>&nbsp;dh)
  2563.                     throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2564. <DL>
  2565. <DD>This method provides the mechanism to set this part's content.
  2566. The given DataHandler object should wrap the actual content.
  2567. <P>
  2568. <DD><DL>
  2569. <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>
  2570. </DD>
  2571. <DD><DL>
  2572. <DT><B>Parameters:</B><DD><CODE>dh</CODE> - The DataHandler for the content.
  2573. <DT><B>Throws:</B>
  2574. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2575.                        implementation does not support modification
  2576. <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
  2577.                        obtained from a READ_ONLY folder.
  2578. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2579. </DD>
  2580. </DL>
  2581. <HR>
  2582.  
  2583. <A NAME="setContent(java.lang.Object, java.lang.String)"><!-- --></A><H3>
  2584. setContent</H3>
  2585. <PRE>
  2586. 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>&nbsp;o,
  2587.                       <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>&nbsp;type)
  2588.                throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2589. <DL>
  2590. <DD>A convenience method for setting this Message's content. <p>
  2591.  
  2592.  The content is wrapped in a DataHandler object. Note that a
  2593.  DataContentHandler class for the specified type should be
  2594.  available to the JavaMail implementation for this to work right.
  2595.  i.e., to do <code>setContent(foobar, "application/x-foobar")</code>,
  2596.  a DataContentHandler for "application/x-foobar" should be installed.
  2597.  Refer to the Java Activation Framework for more information.
  2598. <P>
  2599. <DD><DL>
  2600. <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>
  2601. </DD>
  2602. <DD><DL>
  2603. <DT><B>Parameters:</B><DD><CODE>o</CODE> - the content object<DD><CODE>type</CODE> - Mime type of the object
  2604. <DT><B>Throws:</B>
  2605. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2606.                         implementation does not support modification of
  2607.                         existing values
  2608. <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
  2609.                         obtained from a READ_ONLY folder.
  2610. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2611. </DD>
  2612. </DL>
  2613. <HR>
  2614.  
  2615. <A NAME="setText(java.lang.String)"><!-- --></A><H3>
  2616. setText</H3>
  2617. <PRE>
  2618. 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>&nbsp;text)
  2619.              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2620. <DL>
  2621. <DD>Convenience method that sets the given String as this
  2622.  part's content, with a MIME type of "text/plain". If the
  2623. string contains non US-ASCII characters. it will be encoded
  2624. using the platform's default charset. The charset is also
  2625.  used to set the "charset" parameter.<p>
  2626.  
  2627.  Note that there may be a performance penalty if
  2628.  <code>text</code> is large, since this method may have
  2629.  to scan all the characters to determine what charset to
  2630.  use. <p>
  2631.  
  2632.  If the charset is already known, use the
  2633.  <code>setText</code> method that takes the charset parameter.
  2634. <P>
  2635. <DD><DL>
  2636. <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>
  2637. </DD>
  2638. <DD><DL>
  2639. <DT><B>Parameters:</B><DD><CODE>text</CODE> - the text content to set
  2640. <DT><B>Throws:</B>
  2641. <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>
  2642. </DD>
  2643. </DL>
  2644. <HR>
  2645.  
  2646. <A NAME="setText(java.lang.String, java.lang.String)"><!-- --></A><H3>
  2647. setText</H3>
  2648. <PRE>
  2649. 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>&nbsp;text,
  2650.                     <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>&nbsp;charset)
  2651.              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2652. <DL>
  2653. <DD>Convenience method that sets the given String as this part's
  2654. content, with a MIME type of "text/plain" and the specified
  2655. charset. The given Unicode string will be charset-encoded
  2656. using the specified charset. The charset is also used to set
  2657. the "charset" parameter.
  2658. <P>
  2659. <DD><DL>
  2660. <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>
  2661. </DD>
  2662. <DD><DL>
  2663. <DT><B>Parameters:</B><DD><CODE>text</CODE> - the text content to set<DD><CODE>charset</CODE> - the charset to use for the text
  2664. <DT><B>Throws:</B>
  2665. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if an error occurs</DL>
  2666. </DD>
  2667. </DL>
  2668. <HR>
  2669.  
  2670. <A NAME="setText(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
  2671. setText</H3>
  2672. <PRE>
  2673. 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>&nbsp;text,
  2674.                    <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>&nbsp;charset,
  2675.                    <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>&nbsp;subtype)
  2676.             throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2677. <DL>
  2678. <DD>Convenience method that sets the given String as this part's
  2679.  content, with a primary MIME type of "text" and the specified
  2680.  MIME subtype.  The given Unicode string will be charset-encoded
  2681.  using the specified charset. The charset is also used to set
  2682.  the "charset" parameter.
  2683. <P>
  2684. <DD><DL>
  2685. <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>
  2686. </DD>
  2687. <DD><DL>
  2688. <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")
  2689. <DT><B>Throws:</B>
  2690. <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>
  2691.   <DD>JavaMail 1.4</DD>
  2692. </DL>
  2693. </DD>
  2694. </DL>
  2695. <HR>
  2696.  
  2697. <A NAME="setContent(javax.mail.Multipart)"><!-- --></A><H3>
  2698. setContent</H3>
  2699. <PRE>
  2700. public void <B>setContent</B>(<A HREF="../../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A>&nbsp;mp)
  2701.                 throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2702. <DL>
  2703. <DD>This method sets the Message's content to a Multipart object.
  2704. <P>
  2705. <DD><DL>
  2706. <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>
  2707. </DD>
  2708. <DD><DL>
  2709. <DT><B>Parameters:</B><DD><CODE>mp</CODE> - The multipart object that is the Message's content
  2710. <DT><B>Throws:</B>
  2711. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2712.                         implementation does not support modification of
  2713.                         existing values
  2714. <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
  2715.                         obtained from a READ_ONLY folder.
  2716. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2717. </DD>
  2718. </DL>
  2719. <HR>
  2720.  
  2721. <A NAME="reply(boolean)"><!-- --></A><H3>
  2722. reply</H3>
  2723. <PRE>
  2724. public <A HREF="../../../javax/mail/Message.html" title="class in javax.mail">Message</A> <B>reply</B>(boolean&nbsp;replyToAll)
  2725.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2726. <DL>
  2727. <DD>Get a new Message suitable for a reply to this message.
  2728.  The new Message will have its attributes and headers
  2729.  set up appropriately.  Note that this new message object
  2730.  will be empty, i.e., it will <strong>not</strong> have a "content".
  2731.  These will have to be suitably filled in by the client. <p>
  2732.  
  2733.  If <code>replyToAll</code> is set, the new Message will be addressed
  2734.  to all recipients of this message.  Otherwise, the reply will be
  2735.  addressed to only the sender of this message (using the value
  2736.  of the <code>getReplyTo</code> method).  <p>
  2737.  
  2738.  The "Subject" field is filled in with the original subject
  2739.  prefixed with "Re:" (unless it already starts with "Re:").
  2740.  The "In-Reply-To" header is set in the new message if this
  2741.  message has a "Message-Id" header.  The <code>ANSWERED</code>
  2742.  flag is set in this message.
  2743.  
  2744.  The current implementation also sets the "References" header
  2745.  in the new message to include the contents of the "References"
  2746.  header (or, if missing, the "In-Reply-To" header) in this message,
  2747.  plus the contents of the "Message-Id" header of this message,
  2748.  as described in RFC 2822.
  2749. <P>
  2750. <DD><DL>
  2751. <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>
  2752. </DD>
  2753. <DD><DL>
  2754. <DT><B>Parameters:</B><DD><CODE>replyToAll</CODE> - reply should be sent to all recipients
  2755.                                 of this message
  2756. <DT><B>Returns:</B><DD>the reply Message
  2757. <DT><B>Throws:</B>
  2758. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2759. </DD>
  2760. </DL>
  2761. <HR>
  2762.  
  2763. <A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
  2764. writeTo</H3>
  2765. <PRE>
  2766. 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>&nbsp;os)
  2767.              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>,
  2768.                     <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2769. <DL>
  2770. <DD>Output the message as an RFC 822 format stream. <p>
  2771.  
  2772.  Note that, depending on how the messag was constructed, it may
  2773.  use a variety of line termination conventions.  Generally the
  2774.  output should be sent through an appropriate FilterOutputStream
  2775.  that converts the line terminators to the desired form, either
  2776.  CRLF for MIME compatibility and for use in Internet protocols,
  2777.  or the local platform's line terminator for storage in a local
  2778. text file. <p>
  2779.  
  2780. This implementation calls the <code>writeTo(OutputStream,
  2781. String[])</code> method with a null ignore list.
  2782. <P>
  2783. <DD><DL>
  2784. <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>
  2785. </DD>
  2786. <DD><DL>
  2787.  
  2788. <DT><B>Throws:</B>
  2789. <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
  2790.                                or if an error is generated by the
  2791.                                javax.activation layer.
  2792. <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>
  2793. </DD>
  2794. </DL>
  2795. <HR>
  2796.  
  2797. <A NAME="writeTo(java.io.OutputStream, java.lang.String[])"><!-- --></A><H3>
  2798. writeTo</H3>
  2799. <PRE>
  2800. 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>&nbsp;os,
  2801.                    <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>[]&nbsp;ignoreList)
  2802.             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>,
  2803.                    <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2804. <DL>
  2805. <DD>Output the message as an RFC 822 format stream, without
  2806. specified headers.  If the <code>saved</code> flag is not set,
  2807. the <code>saveChanges</code> method is called.
  2808. If the <code>modified</code> flag is not
  2809. set and the <code>content</code> array is not null, the
  2810. <code>content</code> array is written directly, after
  2811. writing the appropriate message headers.
  2812. <P>
  2813. <DD><DL>
  2814. </DL>
  2815. </DD>
  2816. <DD><DL>
  2817.  
  2818. <DT><B>Throws:</B>
  2819. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  2820. <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
  2821.                                or if an error is generated by the
  2822.                                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>
  2823. </DD>
  2824. </DL>
  2825. <HR>
  2826.  
  2827. <A NAME="getHeader(java.lang.String)"><!-- --></A><H3>
  2828. getHeader</H3>
  2829. <PRE>
  2830. 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>&nbsp;name)
  2831.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2832. <DL>
  2833. <DD>Get all the headers for this header_name. Note that certain
  2834. headers may be encoded as per RFC 2047 if they contain
  2835. non US-ASCII characters and these should be decoded. <p>
  2836.  
  2837. This implementation obtains the headers from the
  2838. <code>headers</code> InternetHeaders object.
  2839. <P>
  2840. <DD><DL>
  2841. <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>
  2842. </DD>
  2843. <DD><DL>
  2844. <DT><B>Parameters:</B><DD><CODE>name</CODE> - name of header
  2845. <DT><B>Returns:</B><DD>array of headers
  2846. <DT><B>Throws:</B>
  2847. <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>
  2848. </DD>
  2849. </DL>
  2850. <HR>
  2851.  
  2852. <A NAME="getHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
  2853. getHeader</H3>
  2854. <PRE>
  2855. 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>&nbsp;name,
  2856.                        <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>&nbsp;delimiter)
  2857.                 throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2858. <DL>
  2859. <DD>Get all the headers for this header name, returned as a single
  2860. String, with headers separated by the delimiter. If the
  2861. delimiter is <code>null</code>, only the first header is
  2862. returned.
  2863. <P>
  2864. <DD><DL>
  2865. <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>
  2866. </DD>
  2867. <DD><DL>
  2868. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of this header<DD><CODE>delimiter</CODE> - separator between values
  2869. <DT><B>Returns:</B><DD>the value fields for all headers with
  2870.                                this name
  2871. <DT><B>Throws:</B>
  2872. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2873. </DD>
  2874. </DL>
  2875. <HR>
  2876.  
  2877. <A NAME="setHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
  2878. setHeader</H3>
  2879. <PRE>
  2880. 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>&nbsp;name,
  2881.                      <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>&nbsp;value)
  2882.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2883. <DL>
  2884. <DD>Set the value for this header_name. Replaces all existing
  2885. header values with this new value. Note that RFC 822 headers
  2886. must contain only US-ASCII characters, so a header that
  2887. contains non US-ASCII characters must have been encoded by the
  2888. caller as per the rules of RFC 2047.
  2889. <P>
  2890. <DD><DL>
  2891. <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>
  2892. </DD>
  2893. <DD><DL>
  2894. <DT><B>Parameters:</B><DD><CODE>name</CODE> - header name<DD><CODE>value</CODE> - header value
  2895. <DT><B>Throws:</B>
  2896. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2897.                        implementation does not support modification
  2898. <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
  2899.                        obtained from a READ_ONLY folder.
  2900. <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>
  2901. </DD>
  2902. </DL>
  2903. <HR>
  2904.  
  2905. <A NAME="addHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
  2906. addHeader</H3>
  2907. <PRE>
  2908. 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>&nbsp;name,
  2909.                      <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>&nbsp;value)
  2910.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2911. <DL>
  2912. <DD>Add this value to the existing values for this header_name.
  2913. Note that RFC 822 headers must contain only US-ASCII
  2914. characters, so a header that contains non US-ASCII characters
  2915. must have been encoded as per the rules of RFC 2047.
  2916. <P>
  2917. <DD><DL>
  2918. <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>
  2919. </DD>
  2920. <DD><DL>
  2921. <DT><B>Parameters:</B><DD><CODE>name</CODE> - header name<DD><CODE>value</CODE> - header value
  2922. <DT><B>Throws:</B>
  2923. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2924.                        implementation does not support modification
  2925. <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
  2926.                        obtained from a READ_ONLY folder.
  2927. <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>
  2928. </DD>
  2929. </DL>
  2930. <HR>
  2931.  
  2932. <A NAME="removeHeader(java.lang.String)"><!-- --></A><H3>
  2933. removeHeader</H3>
  2934. <PRE>
  2935. 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>&nbsp;name)
  2936.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2937. <DL>
  2938. <DD>Remove all headers with this name.
  2939. <P>
  2940. <DD><DL>
  2941. <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>
  2942. </DD>
  2943. <DD><DL>
  2944. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of this header
  2945. <DT><B>Throws:</B>
  2946. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  2947.                        implementation does not support modification
  2948. <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
  2949.                        obtained from a READ_ONLY folder.
  2950. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  2951. </DD>
  2952. </DL>
  2953. <HR>
  2954.  
  2955. <A NAME="getAllHeaders()"><!-- --></A><H3>
  2956. getAllHeaders</H3>
  2957. <PRE>
  2958. 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>()
  2959.                          throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2960. <DL>
  2961. <DD>Return all the headers from this Message as an enumeration
  2962. of Header objects. <p>
  2963.  
  2964. Note that certain headers may be encoded as per RFC 2047
  2965. if they contain non US-ASCII characters and these should
  2966. be decoded. <p>
  2967.  
  2968. This implementation obtains the headers from the
  2969. <code>headers</code> InternetHeaders object.
  2970. <P>
  2971. <DD><DL>
  2972. <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>
  2973. </DD>
  2974. <DD><DL>
  2975.  
  2976. <DT><B>Returns:</B><DD>array of header objects
  2977. <DT><B>Throws:</B>
  2978. <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>
  2979. </DD>
  2980. </DL>
  2981. <HR>
  2982.  
  2983. <A NAME="getMatchingHeaders(java.lang.String[])"><!-- --></A><H3>
  2984. getMatchingHeaders</H3>
  2985. <PRE>
  2986. 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>[]&nbsp;names)
  2987.                               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  2988. <DL>
  2989. <DD>Return matching headers from this Message as an Enumeration of
  2990. Header objects. This implementation obtains the headers from
  2991. the <code>headers</code> InternetHeaders object.
  2992. <P>
  2993. <DD><DL>
  2994. <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>
  2995. </DD>
  2996. <DD><DL>
  2997.  
  2998. <DT><B>Returns:</B><DD>enumeration of Header objects
  2999. <DT><B>Throws:</B>
  3000. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3001. </DD>
  3002. </DL>
  3003. <HR>
  3004.  
  3005. <A NAME="getNonMatchingHeaders(java.lang.String[])"><!-- --></A><H3>
  3006. getNonMatchingHeaders</H3>
  3007. <PRE>
  3008. 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>[]&nbsp;names)
  3009.                                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3010. <DL>
  3011. <DD>Return non-matching headers from this Message as an
  3012. Enumeration of Header objects. This implementation
  3013. obtains the header from the <code>headers</code> InternetHeaders object.
  3014. <P>
  3015. <DD><DL>
  3016. <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>
  3017. </DD>
  3018. <DD><DL>
  3019.  
  3020. <DT><B>Returns:</B><DD>enumeration of Header objects
  3021. <DT><B>Throws:</B>
  3022. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3023. </DD>
  3024. </DL>
  3025. <HR>
  3026.  
  3027. <A NAME="addHeaderLine(java.lang.String)"><!-- --></A><H3>
  3028. addHeaderLine</H3>
  3029. <PRE>
  3030. 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>&nbsp;line)
  3031.                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3032. <DL>
  3033. <DD>Add a raw RFC 822 header-line.
  3034. <P>
  3035. <DD><DL>
  3036. <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>
  3037. </DD>
  3038. <DD><DL>
  3039.  
  3040. <DT><B>Throws:</B>
  3041. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  3042.                        implementation does not support modification
  3043. <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
  3044.                        obtained from a READ_ONLY folder.
  3045. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3046. </DD>
  3047. </DL>
  3048. <HR>
  3049.  
  3050. <A NAME="getAllHeaderLines()"><!-- --></A><H3>
  3051. getAllHeaderLines</H3>
  3052. <PRE>
  3053. 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>()
  3054.                              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3055. <DL>
  3056. <DD>Get all header lines as an Enumeration of Strings. A Header
  3057. line is a raw RFC 822 header-line, containing both the "name"
  3058. and "value" field.
  3059. <P>
  3060. <DD><DL>
  3061. <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>
  3062. </DD>
  3063. <DD><DL>
  3064.  
  3065. <DT><B>Throws:</B>
  3066. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3067. </DD>
  3068. </DL>
  3069. <HR>
  3070.  
  3071. <A NAME="getMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
  3072. getMatchingHeaderLines</H3>
  3073. <PRE>
  3074. 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>[]&nbsp;names)
  3075.                                   throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3076. <DL>
  3077. <DD>Get matching header lines as an Enumeration of Strings.
  3078. A Header line is a raw RFC 822 header-line, containing both
  3079. the "name" and "value" field.
  3080. <P>
  3081. <DD><DL>
  3082. <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>
  3083. </DD>
  3084. <DD><DL>
  3085.  
  3086. <DT><B>Throws:</B>
  3087. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3088. </DD>
  3089. </DL>
  3090. <HR>
  3091.  
  3092. <A NAME="getNonMatchingHeaderLines(java.lang.String[])"><!-- --></A><H3>
  3093. getNonMatchingHeaderLines</H3>
  3094. <PRE>
  3095. 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>[]&nbsp;names)
  3096.                                      throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3097. <DL>
  3098. <DD>Get non-matching header lines as an Enumeration of Strings.
  3099. A Header line is a raw RFC 822 header-line, containing both
  3100. the "name" and "value" field.
  3101. <P>
  3102. <DD><DL>
  3103. <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>
  3104. </DD>
  3105. <DD><DL>
  3106.  
  3107. <DT><B>Throws:</B>
  3108. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3109. </DD>
  3110. </DL>
  3111. <HR>
  3112.  
  3113. <A NAME="getFlags()"><!-- --></A><H3>
  3114. getFlags</H3>
  3115. <PRE>
  3116. public <A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>getFlags</B>()
  3117.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3118. <DL>
  3119. <DD>Return a <code>Flags</code> object containing the flags for
  3120. this message. <p>
  3121.  
  3122. Note that a clone of the internal Flags object is returned, so
  3123. modifying the returned Flags object will not affect the flags
  3124. of this message.
  3125. <P>
  3126. <DD><DL>
  3127. <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>
  3128. </DD>
  3129. <DD><DL>
  3130.  
  3131. <DT><B>Returns:</B><DD>Flags object containing the flags for this message
  3132. <DT><B>Throws:</B>
  3133. <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>
  3134. </DD>
  3135. </DL>
  3136. <HR>
  3137.  
  3138. <A NAME="isSet(javax.mail.Flags.Flag)"><!-- --></A><H3>
  3139. isSet</H3>
  3140. <PRE>
  3141. public boolean <B>isSet</B>(<A HREF="../../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A>&nbsp;flag)
  3142.              throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3143. <DL>
  3144. <DD>Check whether the flag specified in the <code>flag</code>
  3145. argument is set in this message. <p>
  3146.  
  3147. This implementation checks this message's internal
  3148.  <code>flags</code> object.
  3149. <P>
  3150. <DD><DL>
  3151. <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>
  3152. </DD>
  3153. <DD><DL>
  3154. <DT><B>Parameters:</B><DD><CODE>flag</CODE> - the flag
  3155. <DT><B>Returns:</B><DD>value of the specified flag for this message
  3156. <DT><B>Throws:</B>
  3157. <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>,
  3158. <A HREF="../../../javax/mail/Flags.Flag.html#ANSWERED"><CODE>Flags.Flag.ANSWERED</CODE></A>,
  3159. <A HREF="../../../javax/mail/Flags.Flag.html#DELETED"><CODE>Flags.Flag.DELETED</CODE></A>,
  3160. <A HREF="../../../javax/mail/Flags.Flag.html#DRAFT"><CODE>Flags.Flag.DRAFT</CODE></A>,
  3161. <A HREF="../../../javax/mail/Flags.Flag.html#FLAGGED"><CODE>Flags.Flag.FLAGGED</CODE></A>,
  3162. <A HREF="../../../javax/mail/Flags.Flag.html#RECENT"><CODE>Flags.Flag.RECENT</CODE></A>,
  3163. <A HREF="../../../javax/mail/Flags.Flag.html#SEEN"><CODE>Flags.Flag.SEEN</CODE></A></DL>
  3164. </DD>
  3165. </DL>
  3166. <HR>
  3167.  
  3168. <A NAME="setFlags(javax.mail.Flags, boolean)"><!-- --></A><H3>
  3169. setFlags</H3>
  3170. <PRE>
  3171. public void <B>setFlags</B>(<A HREF="../../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  3172.                      boolean&nbsp;set)
  3173.               throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3174. <DL>
  3175. <DD>Set the flags for this message. <p>
  3176.  
  3177.  This implementation modifies the <code>flags</code> field.
  3178. <P>
  3179. <DD><DL>
  3180. <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>
  3181. </DD>
  3182. <DD><DL>
  3183. <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
  3184. <DT><B>Throws:</B>
  3185. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  3186.                         implementation does not support modification
  3187. <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
  3188.                         obtained from a READ_ONLY folder.
  3189. <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>
  3190. </DD>
  3191. </DL>
  3192. <HR>
  3193.  
  3194. <A NAME="saveChanges()"><!-- --></A><H3>
  3195. saveChanges</H3>
  3196. <PRE>
  3197. public void <B>saveChanges</B>()
  3198.                  throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3199. <DL>
  3200. <DD>Updates the appropriate header fields of this message to be
  3201.  consistent with the message's contents. If this message is
  3202. contained in a Folder, any changes made to this message are
  3203. committed to the containing folder. <p>
  3204.  
  3205. If any part of a message's headers or contents are changed,
  3206.  <code>saveChanges</code> must be called to ensure that those
  3207.  changes are permanent. Otherwise, any such modifications may or
  3208.  may not be saved, depending on the folder implementation. <p>
  3209.  
  3210.  Messages obtained from folders opened READ_ONLY should not be
  3211.  modified and saveChanges should not be called on such messages. <p>
  3212.  
  3213.  This method sets the <code>modified</code> flag to true, the
  3214.  <code>save</code> flag to true, and then calls the
  3215.  <code>updateHeaders<code> method.
  3216. <P>
  3217. <DD><DL>
  3218. <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>
  3219. </DD>
  3220. <DD><DL>
  3221.  
  3222. <DT><B>Throws:</B>
  3223. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  3224.                         implementation does not support modification
  3225. <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
  3226.                         obtained from a READ_ONLY folder.
  3227. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3228. </DD>
  3229. </DL>
  3230. <HR>
  3231.  
  3232. <A NAME="updateMessageID()"><!-- --></A><H3>
  3233. updateMessageID</H3>
  3234. <PRE>
  3235. protected void <B>updateMessageID</B>()
  3236.                         throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3237. <DL>
  3238. <DD>Update the Message-ID header.  This method is called
  3239.  by the <code>updateHeaders</code> and allows a subclass
  3240.  to override only the algorithm for choosing a Message-ID.
  3241. <P>
  3242. <DD><DL>
  3243. </DL>
  3244. </DD>
  3245. <DD><DL>
  3246.  
  3247. <DT><B>Throws:</B>
  3248. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  3249.   <DD>JavaMail 1.4</DD>
  3250. </DL>
  3251. </DD>
  3252. </DL>
  3253. <HR>
  3254.  
  3255. <A NAME="updateHeaders()"><!-- --></A><H3>
  3256. updateHeaders</H3>
  3257. <PRE>
  3258. protected void <B>updateHeaders</B>()
  3259.                       throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3260. <DL>
  3261. <DD>Called by the <code>saveChanges</code> method to actually
  3262.  update the MIME headers.  The implementation here sets the
  3263.  <code>Content-Transfer-Encoding</code> header (if needed
  3264.  and not already set), the <code>MIME-Version</code> header
  3265.  and the <code>Message-ID</code> header. Also, if the content
  3266.  of this message is a <code>MimeMultipart</code>, it's
  3267. <code>updateHeaders</code> method is called.
  3268. <P>
  3269. <DD><DL>
  3270. </DL>
  3271. </DD>
  3272. <DD><DL>
  3273.  
  3274. <DT><B>Throws:</B>
  3275. <DD><CODE><A HREF="../../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  3276.                        implementation does not support modification
  3277. <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
  3278.                        obtained from a READ_ONLY folder.
  3279. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  3280. </DD>
  3281. </DL>
  3282. <HR>
  3283.  
  3284. <A NAME="createInternetHeaders(java.io.InputStream)"><!-- --></A><H3>
  3285. createInternetHeaders</H3>
  3286. <PRE>
  3287. 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>&nbsp;is)
  3288.                                         throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3289. <DL>
  3290. <DD>Create and return an InternetHeaders object that loads the
  3291. headers from the given InputStream.  Subclasses can override
  3292. this method to return a subclass of InternetHeaders, if
  3293. necessary.  This implementation simply constructs and returns
  3294. an InternetHeaders object.
  3295. <P>
  3296. <DD><DL>
  3297. </DL>
  3298. </DD>
  3299. <DD><DL>
  3300. <DT><B>Parameters:</B><DD><CODE>is</CODE> - the InputStream to read the headers from
  3301. <DT><B>Throws:</B>
  3302. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  3303.  <DD>JavaMail 1.2</DD>
  3304. </DL>
  3305. </DD>
  3306. </DL>
  3307. <HR>
  3308.  
  3309. <A NAME="createMimeMessage(javax.mail.Session)"><!-- --></A><H3>
  3310. createMimeMessage</H3>
  3311. <PRE>
  3312. 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>&nbsp;session)
  3313.                                 throws <A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  3314. <DL>
  3315. <DD>Create and return a MimeMessage object.  The reply method
  3316. uses this method to create the MimeMessage object that it
  3317. will return.  Subclasses can override this method to return
  3318. a subclass of MimeMessage.  This implementation simply constructs
  3319. and returns a MimeMessage object using the supplied Session.
  3320. <P>
  3321. <DD><DL>
  3322. </DL>
  3323. </DD>
  3324. <DD><DL>
  3325. <DT><B>Parameters:</B><DD><CODE>session</CODE> - the Session to use for the new message
  3326. <DT><B>Returns:</B><DD>the new MimeMessage object
  3327. <DT><B>Throws:</B>
  3328. <DD><CODE><A HREF="../../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>Since:</B></DT>
  3329.  <DD>JavaMail 1.4</DD>
  3330. </DL>
  3331. </DD>
  3332. </DL>
  3333. <!-- ========= END OF CLASS DATA ========= -->
  3334. <HR>
  3335.  
  3336.  
  3337. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  3338. <A NAME="navbar_bottom"><!-- --></A>
  3339. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  3340. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  3341. <TR>
  3342. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  3343. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  3344. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  3345.  <TR ALIGN="center" VALIGN="top">
  3346.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  3347.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  3348.  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  3349.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MimeMessage.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  3350.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  3351.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  3352.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  3353.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  3354.  </TR>
  3355. </TABLE>
  3356. </TD>
  3357. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  3358. </EM>
  3359. </TD>
  3360. </TR>
  3361.  
  3362. <TR>
  3363. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  3364. &nbsp;<A HREF="../../../javax/mail/internet/MimeBodyPart.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>&nbsp;
  3365. &nbsp;<A HREF="../../../javax/mail/internet/MimeMessage.RecipientType.html" title="class in javax.mail.internet"><B>NEXT CLASS</B></A></FONT></TD>
  3366. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  3367.  <A HREF="../../../index.html?javax/mail/internet/MimeMessage.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  3368. &nbsp;<A HREF="MimeMessage.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  3369. &nbsp;<SCRIPT type="text/javascript">
  3370.  <!--
  3371.  if(window==top) {
  3372.    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  3373.  }
  3374.  //-->
  3375. </SCRIPT>
  3376. <NOSCRIPT>
  3377.  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  3378. </NOSCRIPT>
  3379.  
  3380.  
  3381. </FONT></TD>
  3382. </TR>
  3383. <TR>
  3384. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  3385.  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  3386. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  3387. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  3388. </TR>
  3389. </TABLE>
  3390. <A NAME="skip-navbar_bottom"></A>
  3391. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  3392.  
  3393. <HR>
  3394. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  3395. </BODY>
  3396. </HTML>
  3397.