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:38 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. Multipart (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="Multipart (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/Multipart.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/MethodNotSupportedException.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/MultipartDataSource.html" title="interface in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../index.html?javax/mail/Multipart.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="Multipart.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;NESTED&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</FONT>
  93. <BR>
  94. Class Multipart</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 "><B>javax.mail.Multipart</B>
  98. </PRE>
  99. <DL>
  100. <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../javax/mail/internet/MimeMultipart.html" title="class in javax.mail.internet">MimeMultipart</A></DD>
  101. </DL>
  102. <HR>
  103. <DL>
  104. <DT><PRE>public abstract class <B>Multipart</B><DT>extends <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></DL>
  105. </PRE>
  106.  
  107. <P>
  108. Multipart is a container that holds multiple body parts. Multipart
  109.  provides methods to retrieve and set its subparts. <p>
  110.  
  111.  Multipart also acts as the base class for the content object returned
  112.  by most Multipart DataContentHandlers. For example, invoking getContent()
  113.  on a DataHandler whose source is a "multipart/signed" data source may
  114.  return an appropriate subclass of Multipart. <p>
  115.  
  116.  Some messaging systems provide different subtypes of Multiparts. For
  117.  example, MIME specifies a set of subtypes that include "alternative",
  118.  "mixed", "related", "parallel", "signed", etc. <p>
  119.  
  120.  Multipart is an abstract class.  Subclasses provide actual implementations.
  121. <P>
  122.  
  123. <P>
  124. <HR>
  125.  
  126. <P>
  127. <!-- =========== FIELD SUMMARY =========== -->
  128.  
  129. <A NAME="field_summary"><!-- --></A>
  130. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  131. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  132. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  133. <B>Field Summary</B></FONT></TH>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  137. <CODE>protected &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>
  138. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#contentType">contentType</A></B></CODE>
  139.  
  140. <BR>
  141. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field specifies the content-type of this multipart
  142.  object.</TD>
  143. </TR>
  144. <TR BGCOLOR="white" CLASS="TableRowColor">
  145. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  146. <CODE>protected &nbsp;<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></FONT></TD>
  147. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#parent">parent</A></B></CODE>
  148.  
  149. <BR>
  150. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <code>Part</code> containing this <code>Multipart</code>,
  151.  if known.</TD>
  152. </TR>
  153. <TR BGCOLOR="white" CLASS="TableRowColor">
  154. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  155. <CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</A></CODE></FONT></TD>
  156. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#parts">parts</A></B></CODE>
  157.  
  158. <BR>
  159. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vector of BodyPart objects.</TD>
  160. </TR>
  161. </TABLE>
  162. &nbsp;
  163. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  164.  
  165. <A NAME="constructor_summary"><!-- --></A>
  166. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  167. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  168. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  169. <B>Constructor Summary</B></FONT></TH>
  170. </TR>
  171. <TR BGCOLOR="white" CLASS="TableRowColor">
  172. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  173. <CODE>protected </CODE></FONT></TD>
  174. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#Multipart()">Multipart</A></B>()</CODE>
  175.  
  176. <BR>
  177. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
  178. </TR>
  179. </TABLE>
  180. &nbsp;
  181. <!-- ========== METHOD SUMMARY =========== -->
  182.  
  183. <A NAME="method_summary"><!-- --></A>
  184. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  185. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  186. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  187. <B>Method Summary</B></FONT></TH>
  188. </TR>
  189. <TR BGCOLOR="white" CLASS="TableRowColor">
  190. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  191. <CODE>&nbsp;void</CODE></FONT></TD>
  192. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart)">addBodyPart</A></B>(<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part)</CODE>
  193.  
  194. <BR>
  195. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Part to the multipart.</TD>
  196. </TR>
  197. <TR BGCOLOR="white" CLASS="TableRowColor">
  198. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  199. <CODE>&nbsp;void</CODE></FONT></TD>
  200. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#addBodyPart(javax.mail.BodyPart, int)">addBodyPart</A></B>(<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part,
  201.             int&nbsp;index)</CODE>
  202.  
  203. <BR>
  204. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a BodyPart at position <code>index</code>.</TD>
  205. </TR>
  206. <TR BGCOLOR="white" CLASS="TableRowColor">
  207. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  208. <CODE>&nbsp;<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A></CODE></FONT></TD>
  209. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getBodyPart(int)">getBodyPart</A></B>(int&nbsp;index)</CODE>
  210.  
  211. <BR>
  212. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the specified Part.</TD>
  213. </TR>
  214. <TR BGCOLOR="white" CLASS="TableRowColor">
  215. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  216. <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>
  217. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getContentType()">getContentType</A></B>()</CODE>
  218.  
  219. <BR>
  220. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the content-type of this Multipart.</TD>
  221. </TR>
  222. <TR BGCOLOR="white" CLASS="TableRowColor">
  223. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  224. <CODE>&nbsp;int</CODE></FONT></TD>
  225. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getCount()">getCount</A></B>()</CODE>
  226.  
  227. <BR>
  228. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number of enclosed BodyPart objects.</TD>
  229. </TR>
  230. <TR BGCOLOR="white" CLASS="TableRowColor">
  231. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  232. <CODE>&nbsp;<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></CODE></FONT></TD>
  233. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#getParent()">getParent</A></B>()</CODE>
  234.  
  235. <BR>
  236. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the <code>Part</code> that contains this <code>Multipart</code>
  237.  object, or <code>null</code> if not known.</TD>
  238. </TR>
  239. <TR BGCOLOR="white" CLASS="TableRowColor">
  240. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  241. <CODE>&nbsp;boolean</CODE></FONT></TD>
  242. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#removeBodyPart(javax.mail.BodyPart)">removeBodyPart</A></B>(<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part)</CODE>
  243.  
  244. <BR>
  245. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the specified part from the multipart message.</TD>
  246. </TR>
  247. <TR BGCOLOR="white" CLASS="TableRowColor">
  248. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  249. <CODE>&nbsp;void</CODE></FONT></TD>
  250. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#removeBodyPart(int)">removeBodyPart</A></B>(int&nbsp;index)</CODE>
  251.  
  252. <BR>
  253. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the part at specified location (starting from 0).</TD>
  254. </TR>
  255. <TR BGCOLOR="white" CLASS="TableRowColor">
  256. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  257. <CODE>protected &nbsp;void</CODE></FONT></TD>
  258. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#setMultipartDataSource(javax.mail.MultipartDataSource)">setMultipartDataSource</A></B>(<A HREF="../../javax/mail/MultipartDataSource.html" title="interface in javax.mail">MultipartDataSource</A>&nbsp;mp)</CODE>
  259.  
  260. <BR>
  261. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setup this Multipart object from the given MultipartDataSource.</TD>
  262. </TR>
  263. <TR BGCOLOR="white" CLASS="TableRowColor">
  264. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  265. <CODE>&nbsp;void</CODE></FONT></TD>
  266. <TD><CODE><B><A HREF="../../javax/mail/Multipart.html#setParent(javax.mail.Part)">setParent</A></B>(<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A>&nbsp;parent)</CODE>
  267.  
  268. <BR>
  269. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the parent of this <code>Multipart</code> to be the specified
  270.  <code>Part</code>.</TD>
  271. </TR>
  272. <TR BGCOLOR="white" CLASS="TableRowColor">
  273. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  274. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  275. <TD><CODE><B><A HREF="../../javax/mail/Multipart.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>
  276.  
  277. <BR>
  278. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output an appropriately encoded bytestream to the given
  279.  OutputStream.</TD>
  280. </TR>
  281. </TABLE>
  282. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  283. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  284. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  285. <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>
  286. </TR>
  287. <TR BGCOLOR="white" CLASS="TableRowColor">
  288. <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>
  289. </TR>
  290. </TABLE>
  291. &nbsp;
  292. <P>
  293.  
  294. <!-- ============ FIELD DETAIL =========== -->
  295.  
  296. <A NAME="field_detail"><!-- --></A>
  297. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  298. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  299. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  300. <B>Field Detail</B></FONT></TH>
  301. </TR>
  302. </TABLE>
  303.  
  304. <A NAME="parts"><!-- --></A><H3>
  305. parts</H3>
  306. <PRE>
  307. protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</A> <B>parts</B></PRE>
  308. <DL>
  309. <DD>Vector of BodyPart objects.
  310. <P>
  311. <DL>
  312. </DL>
  313. </DL>
  314. <HR>
  315.  
  316. <A NAME="contentType"><!-- --></A><H3>
  317. contentType</H3>
  318. <PRE>
  319. protected <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>contentType</B></PRE>
  320. <DL>
  321. <DD>This field specifies the content-type of this multipart
  322.  object. It defaults to "multipart/mixed".
  323. <P>
  324. <DL>
  325. </DL>
  326. </DL>
  327. <HR>
  328.  
  329. <A NAME="parent"><!-- --></A><H3>
  330. parent</H3>
  331. <PRE>
  332. protected <A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A> <B>parent</B></PRE>
  333. <DL>
  334. <DD>The <code>Part</code> containing this <code>Multipart</code>,
  335.  if known.
  336. <P>
  337. <DL>
  338. <DT><B>Since:</B></DT>
  339.   <DD>JavaMail 1.1</DD>
  340. </DL>
  341. </DL>
  342.  
  343. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  344.  
  345. <A NAME="constructor_detail"><!-- --></A>
  346. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  347. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  348. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  349. <B>Constructor Detail</B></FONT></TH>
  350. </TR>
  351. </TABLE>
  352.  
  353. <A NAME="Multipart()"><!-- --></A><H3>
  354. Multipart</H3>
  355. <PRE>
  356. protected <B>Multipart</B>()</PRE>
  357. <DL>
  358. <DD>Default constructor. An empty Multipart object is created.
  359. <P>
  360. </DL>
  361.  
  362. <!-- ============ METHOD DETAIL ========== -->
  363.  
  364. <A NAME="method_detail"><!-- --></A>
  365. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  366. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  367. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  368. <B>Method Detail</B></FONT></TH>
  369. </TR>
  370. </TABLE>
  371.  
  372. <A NAME="setMultipartDataSource(javax.mail.MultipartDataSource)"><!-- --></A><H3>
  373. setMultipartDataSource</H3>
  374. <PRE>
  375. protected void <B>setMultipartDataSource</B>(<A HREF="../../javax/mail/MultipartDataSource.html" title="interface in javax.mail">MultipartDataSource</A>&nbsp;mp)
  376.                                throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  377. <DL>
  378. <DD>Setup this Multipart object from the given MultipartDataSource. <p>
  379.  
  380.  The method adds the MultipartDataSource's BodyPart
  381. objects into this Multipart. This Multipart's contentType is
  382.  set to that of the MultipartDataSource. <p>
  383.  
  384.  This method is typically used in those cases where one
  385.  has a multipart data source that has already been pre-parsed into
  386.  the individual body parts (for example, an IMAP datasource), but
  387.  needs to create an appropriate Multipart subclass that represents
  388.  a specific multipart subtype.
  389. <P>
  390. <DD><DL>
  391. <DT><B>Parameters:</B><DD><CODE>mp</CODE> - Multipart datasource
  392. <DT><B>Throws:</B>
  393. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  394. </DD>
  395. </DL>
  396. <HR>
  397.  
  398. <A NAME="getContentType()"><!-- --></A><H3>
  399. getContentType</H3>
  400. <PRE>
  401. 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>()</PRE>
  402. <DL>
  403. <DD>Return the content-type of this Multipart. <p>
  404.  
  405.  This implementation just returns the value of the
  406.  <code>contentType</code> field.
  407. <P>
  408. <DD><DL>
  409.  
  410. <DT><B>Returns:</B><DD>content-type<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Multipart.html#contentType"><CODE>contentType</CODE></A></DL>
  411. </DD>
  412. </DL>
  413. <HR>
  414.  
  415. <A NAME="getCount()"><!-- --></A><H3>
  416. getCount</H3>
  417. <PRE>
  418. public int <B>getCount</B>()
  419.              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  420. <DL>
  421. <DD>Return the number of enclosed BodyPart objects. <p>
  422. <P>
  423. <DD><DL>
  424.  
  425. <DT><B>Returns:</B><DD>number of parts
  426. <DT><B>Throws:</B>
  427. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Multipart.html#parts"><CODE>parts</CODE></A></DL>
  428. </DD>
  429. </DL>
  430. <HR>
  431.  
  432. <A NAME="getBodyPart(int)"><!-- --></A><H3>
  433. getBodyPart</H3>
  434. <PRE>
  435. public <A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A> <B>getBodyPart</B>(int&nbsp;index)
  436.                      throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  437. <DL>
  438. <DD>Get the specified Part.  Parts are numbered starting at 0.
  439. <P>
  440. <DD><DL>
  441. <DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired Part
  442. <DT><B>Returns:</B><DD>the Part
  443. <DT><B>Throws:</B>
  444. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the given index
  445.                         is out of range.
  446. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  447. </DD>
  448. </DL>
  449. <HR>
  450.  
  451. <A NAME="removeBodyPart(javax.mail.BodyPart)"><!-- --></A><H3>
  452. removeBodyPart</H3>
  453. <PRE>
  454. public boolean <B>removeBodyPart</B>(<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part)
  455.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  456. <DL>
  457. <DD>Remove the specified part from the multipart message.
  458.  Shifts all the parts after the removed part down one.
  459. <P>
  460. <DD><DL>
  461. <DT><B>Parameters:</B><DD><CODE>part</CODE> - The part to remove
  462. <DT><B>Returns:</B><DD>true if part removed, false otherwise
  463. <DT><B>Throws:</B>
  464. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - if no such Part exists
  465. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  466.                         implementation does not support modification
  467.                         of existing values</DL>
  468. </DD>
  469. </DL>
  470. <HR>
  471.  
  472. <A NAME="removeBodyPart(int)"><!-- --></A><H3>
  473. removeBodyPart</H3>
  474. <PRE>
  475. public void <B>removeBodyPart</B>(int&nbsp;index)
  476.                     throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  477. <DL>
  478. <DD>Remove the part at specified location (starting from 0).
  479.  Shifts all the parts after the removed part down one.
  480. <P>
  481. <DD><DL>
  482. <DT><B>Parameters:</B><DD><CODE>index</CODE> - Index of the part to remove
  483. <DT><B>Throws:</B>
  484. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  485. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the given index
  486.                         is out of range.
  487. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  488.                         implementation does not support modification
  489.                         of existing values</DL>
  490. </DD>
  491. </DL>
  492. <HR>
  493.  
  494. <A NAME="addBodyPart(javax.mail.BodyPart)"><!-- --></A><H3>
  495. addBodyPart</H3>
  496. <PRE>
  497. public void <B>addBodyPart</B>(<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part)
  498.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  499. <DL>
  500. <DD>Adds a Part to the multipart.  The BodyPart is appended to
  501.  the list of existing Parts.
  502. <P>
  503. <DD><DL>
  504. <DT><B>Parameters:</B><DD><CODE>part</CODE> - The Part to be appended
  505. <DT><B>Throws:</B>
  506. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  507. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  508.                         implementation does not support modification
  509.                         of existing values</DL>
  510. </DD>
  511. </DL>
  512. <HR>
  513.  
  514. <A NAME="addBodyPart(javax.mail.BodyPart, int)"><!-- --></A><H3>
  515. addBodyPart</H3>
  516. <PRE>
  517. public void <B>addBodyPart</B>(<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A>&nbsp;part,
  518.                         int&nbsp;index)
  519.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  520. <DL>
  521. <DD>Adds a BodyPart at position <code>index</code>.
  522.  If <code>index</code> is not the last one in the list,
  523.  the subsequent parts are shifted up. If <code>index</code>
  524.  is larger than the number of parts present, the
  525.  BodyPart is appended to the end.
  526. <P>
  527. <DD><DL>
  528. <DT><B>Parameters:</B><DD><CODE>part</CODE> - The BodyPart to be inserted<DD><CODE>index</CODE> - Location where to insert the part
  529. <DT><B>Throws:</B>
  530. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  531. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  532.                         implementation does not support modification
  533.                         of existing values</DL>
  534. </DD>
  535. </DL>
  536. <HR>
  537.  
  538. <A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
  539. writeTo</H3>
  540. <PRE>
  541. public abstract 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)
  542.                       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>,
  543.                              <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  544. <DL>
  545. <DD>Output an appropriately encoded bytestream to the given
  546.  OutputStream. The implementation subclass decides the
  547.  appropriate encoding algorithm to be used. The bytestream
  548.  is typically used for sending.
  549. <P>
  550. <DD><DL>
  551.  
  552. <DT><B>Throws:</B>
  553. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an IO related exception occurs
  554. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  555. </DD>
  556. </DL>
  557. <HR>
  558.  
  559. <A NAME="getParent()"><!-- --></A><H3>
  560. getParent</H3>
  561. <PRE>
  562. public <A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A> <B>getParent</B>()</PRE>
  563. <DL>
  564. <DD>Return the <code>Part</code> that contains this <code>Multipart</code>
  565.  object, or <code>null</code> if not known.
  566. <P>
  567. <DD><DL>
  568. <DT><B>Since:</B></DT>
  569.   <DD>JavaMail 1.1</DD>
  570. </DL>
  571. </DD>
  572. </DL>
  573. <HR>
  574.  
  575. <A NAME="setParent(javax.mail.Part)"><!-- --></A><H3>
  576. setParent</H3>
  577. <PRE>
  578. public void <B>setParent</B>(<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A>&nbsp;parent)</PRE>
  579. <DL>
  580. <DD>Set the parent of this <code>Multipart</code> to be the specified
  581.  <code>Part</code>.  Normally called by the <code>Message</code>
  582.  or <code>BodyPart</code> <code>setContent(Multipart)</code> method.
  583.  <code>parent</code> may be <code>null</code> if the
  584.  <code>Multipart</code> is being removed from its containing
  585.  <code>Part</code>.
  586. <P>
  587. <DD><DL>
  588. <DT><B>Since:</B></DT>
  589.   <DD>JavaMail 1.1</DD>
  590. </DL>
  591. </DD>
  592. </DL>
  593. <!-- ========= END OF CLASS DATA ========= -->
  594. <HR>
  595.  
  596.  
  597. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  598. <A NAME="navbar_bottom"><!-- --></A>
  599. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  600. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  601. <TR>
  602. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  603. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  604. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  605.   <TR ALIGN="center" VALIGN="top">
  606.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  607.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  608.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  609.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Multipart.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  610.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  611.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  612.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  613.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  614.   </TR>
  615. </TABLE>
  616. </TD>
  617. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  618. </EM>
  619. </TD>
  620. </TR>
  621.  
  622. <TR>
  623. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  624. &nbsp;<A HREF="../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  625. &nbsp;<A HREF="../../javax/mail/MultipartDataSource.html" title="interface in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  626. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  627.   <A HREF="../../index.html?javax/mail/Multipart.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  628. &nbsp;<A HREF="Multipart.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  629. &nbsp;<SCRIPT type="text/javascript">
  630.   <!--
  631.   if(window==top) {
  632.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  633.   }
  634.   //-->
  635. </SCRIPT>
  636. <NOSCRIPT>
  637.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  638. </NOSCRIPT>
  639.  
  640.  
  641. </FONT></TD>
  642. </TR>
  643. <TR>
  644. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  645.   SUMMARY:&nbsp;NESTED&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>
  646. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  647. 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>
  648. </TR>
  649. </TABLE>
  650. <A NAME="skip-navbar_bottom"></A>
  651. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  652.  
  653. <HR>
  654. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  655. </BODY>
  656. </HTML>
  657.