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. MultipartDataSource (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="MultipartDataSource (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/MultipartDataSource.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/Multipart.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/NoSuchProviderException.html" title="class 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/MultipartDataSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="MultipartDataSource.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  81. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  82. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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. Interface MultipartDataSource</H2>
  95. <DL>
  96. <DT><B>All Superinterfaces:</B> <DD><A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</A></DD>
  97. </DL>
  98. <HR>
  99. <DL>
  100. <DT><PRE>public interface <B>MultipartDataSource</B><DT>extends <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</A></DL>
  101. </PRE>
  102.  
  103. <P>
  104. MultipartDataSource is a <code>DataSource</code> that contains body
  105.  parts.  This allows "mail aware" <code>DataContentHandlers</code> to
  106.  be implemented more efficiently by being aware of such
  107.  <code>DataSources</code> and using the appropriate methods to access
  108.  <code>BodyParts</code>. <p>
  109.  
  110.  Note that the data of a MultipartDataSource is also available as
  111.  an input stream. <p>
  112.  
  113.  This interface will typically be implemented by providers that
  114.  preparse multipart bodies, for example an IMAP provider.
  115. <P>
  116.  
  117. <P>
  118. <DL>
  119. <DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation"><CODE>DataSource</CODE></A></DL>
  120. <HR>
  121.  
  122. <P>
  123.  
  124. <!-- ========== METHOD SUMMARY =========== -->
  125.  
  126. <A NAME="method_summary"><!-- --></A>
  127. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  128. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  129. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  130. <B>Method Summary</B></FONT></TH>
  131. </TR>
  132. <TR BGCOLOR="white" CLASS="TableRowColor">
  133. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  134. <CODE>&nbsp;<A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A></CODE></FONT></TD>
  135. <TD><CODE><B><A HREF="../../javax/mail/MultipartDataSource.html#getBodyPart(int)">getBodyPart</A></B>(int&nbsp;index)</CODE>
  136.  
  137. <BR>
  138. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the specified Part.</TD>
  139. </TR>
  140. <TR BGCOLOR="white" CLASS="TableRowColor">
  141. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  142. <CODE>&nbsp;int</CODE></FONT></TD>
  143. <TD><CODE><B><A HREF="../../javax/mail/MultipartDataSource.html#getCount()">getCount</A></B>()</CODE>
  144.  
  145. <BR>
  146. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number of enclosed BodyPart objects.</TD>
  147. </TR>
  148. </TABLE>
  149. &nbsp;<A NAME="methods_inherited_from_class_javax.activation.DataSource"><!-- --></A>
  150. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  151. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  152. <TH ALIGN="left"><B>Methods inherited from interface javax.activation.<A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</A></B></TH>
  153. </TR>
  154. <TR BGCOLOR="white" CLASS="TableRowColor">
  155. <TD><CODE><A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true#getContentType()" title="class or interface in javax.activation">getContentType</A>, <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true#getInputStream()" title="class or interface in javax.activation">getInputStream</A>, <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true#getName()" title="class or interface in javax.activation">getName</A>, <A HREF="http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs/javax/activation/DataSource.html?is-external=true#getOutputStream()" title="class or interface in javax.activation">getOutputStream</A></CODE></TD>
  156. </TR>
  157. </TABLE>
  158. &nbsp;
  159. <P>
  160.  
  161. <!-- ============ METHOD DETAIL ========== -->
  162.  
  163. <A NAME="method_detail"><!-- --></A>
  164. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  165. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  166. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  167. <B>Method Detail</B></FONT></TH>
  168. </TR>
  169. </TABLE>
  170.  
  171. <A NAME="getCount()"><!-- --></A><H3>
  172. getCount</H3>
  173. <PRE>
  174. int <B>getCount</B>()</PRE>
  175. <DL>
  176. <DD>Return the number of enclosed BodyPart objects.
  177. <P>
  178. <DD><DL>
  179. </DL>
  180. </DD>
  181. <DD><DL>
  182.  
  183. <DT><B>Returns:</B><DD>number of parts</DL>
  184. </DD>
  185. </DL>
  186. <HR>
  187.  
  188. <A NAME="getBodyPart(int)"><!-- --></A><H3>
  189. getBodyPart</H3>
  190. <PRE>
  191. <A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A> <B>getBodyPart</B>(int&nbsp;index)
  192.                      throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  193. <DL>
  194. <DD>Get the specified Part.  Parts are numbered starting at 0.
  195. <P>
  196. <DD><DL>
  197. </DL>
  198. </DD>
  199. <DD><DL>
  200. <DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired Part
  201. <DT><B>Returns:</B><DD>the Part
  202. <DT><B>Throws:</B>
  203. <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
  204.                         is out of range.
  205. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  206. </DD>
  207. </DL>
  208. <!-- ========= END OF CLASS DATA ========= -->
  209. <HR>
  210.  
  211.  
  212. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  213. <A NAME="navbar_bottom"><!-- --></A>
  214. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  215. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  216. <TR>
  217. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  218. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  219. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  220.   <TR ALIGN="center" VALIGN="top">
  221.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  222.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  223.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  224.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MultipartDataSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  225.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  226.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  227.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  228.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  229.   </TR>
  230. </TABLE>
  231. </TD>
  232. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  233. </EM>
  234. </TD>
  235. </TR>
  236.  
  237. <TR>
  238. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  239. &nbsp;<A HREF="../../javax/mail/Multipart.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  240. &nbsp;<A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  241. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  242.   <A HREF="../../index.html?javax/mail/MultipartDataSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  243. &nbsp;<A HREF="MultipartDataSource.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  244. &nbsp;<SCRIPT type="text/javascript">
  245.   <!--
  246.   if(window==top) {
  247.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  248.   }
  249.   //-->
  250. </SCRIPT>
  251. <NOSCRIPT>
  252.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  253. </NOSCRIPT>
  254.  
  255.  
  256. </FONT></TD>
  257. </TR>
  258. <TR>
  259. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  260.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  261. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  262. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  263. </TR>
  264. </TABLE>
  265. <A NAME="skip-navbar_bottom"></A>
  266. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  267.  
  268. <HR>
  269. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  270. </BODY>
  271. </HTML>
  272.