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:39 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. ByteArrayDataSource (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="ByteArrayDataSource (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/ByteArrayDataSource.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;PREV CLASS&nbsp;
  60. &nbsp;<A HREF="../../../javax/mail/util/SharedByteArrayInputStream.html" title="class in javax.mail.util"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../../index.html?javax/mail/util/ByteArrayDataSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="ByteArrayDataSource.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;<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;FIELD&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.util</FONT>
  93. <BR>
  94. Class ByteArrayDataSource</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.util.ByteArrayDataSource</B>
  98. </PRE>
  99. <DL>
  100. <DT><B>All Implemented Interfaces:</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>
  101. </DL>
  102. <HR>
  103. <DL>
  104. <DT><PRE>public class <B>ByteArrayDataSource</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><DT>implements <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>
  105. </PRE>
  106.  
  107. <P>
  108. A DataSource backed by a byte array.  The byte array may be
  109.  passed in directly, or may be initialized from an InputStream
  110.  or a String.
  111. <P>
  112.  
  113. <P>
  114. <DL>
  115. <DT><B>Since:</B></DT>
  116.   <DD>JavaMail 1.4</DD>
  117. </DL>
  118. <HR>
  119.  
  120. <P>
  121.  
  122. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  123.  
  124. <A NAME="constructor_summary"><!-- --></A>
  125. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  126. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  127. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  128. <B>Constructor Summary</B></FONT></TH>
  129. </TR>
  130. <TR BGCOLOR="white" CLASS="TableRowColor">
  131. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#ByteArrayDataSource(byte[], java.lang.String)">ByteArrayDataSource</A></B>(byte[]&nbsp;data,
  132.                     <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>
  133.  
  134. <BR>
  135. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a ByteArrayDataSource with data from the
  136.  specified byte array and with the specified MIME type.</TD>
  137. </TR>
  138. <TR BGCOLOR="white" CLASS="TableRowColor">
  139. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#ByteArrayDataSource(java.io.InputStream, java.lang.String)">ByteArrayDataSource</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,
  140.                     <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>
  141.  
  142. <BR>
  143. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a ByteArrayDataSource with data from the
  144.  specified InputStream and with the specified MIME type.</TD>
  145. </TR>
  146. <TR BGCOLOR="white" CLASS="TableRowColor">
  147. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#ByteArrayDataSource(java.lang.String, java.lang.String)">ByteArrayDataSource</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;data,
  148.                     <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>
  149.  
  150. <BR>
  151. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a ByteArrayDataSource with data from the
  152.  specified String and with the specified MIME type.</TD>
  153. </TR>
  154. </TABLE>
  155. &nbsp;
  156. <!-- ========== METHOD SUMMARY =========== -->
  157.  
  158. <A NAME="method_summary"><!-- --></A>
  159. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  160. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  161. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  162. <B>Method Summary</B></FONT></TH>
  163. </TR>
  164. <TR BGCOLOR="white" CLASS="TableRowColor">
  165. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  166. <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>
  167. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#getContentType()">getContentType</A></B>()</CODE>
  168.  
  169. <BR>
  170. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the MIME content type of the data.</TD>
  171. </TR>
  172. <TR BGCOLOR="white" CLASS="TableRowColor">
  173. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  174. <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>
  175. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#getInputStream()">getInputStream</A></B>()</CODE>
  176.  
  177. <BR>
  178. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an InputStream for the data.</TD>
  179. </TR>
  180. <TR BGCOLOR="white" CLASS="TableRowColor">
  181. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  182. <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>
  183. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#getName()">getName</A></B>()</CODE>
  184.  
  185. <BR>
  186. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the name of the data.</TD>
  187. </TR>
  188. <TR BGCOLOR="white" CLASS="TableRowColor">
  189. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  190. <CODE>&nbsp;<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></CODE></FONT></TD>
  191. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#getOutputStream()">getOutputStream</A></B>()</CODE>
  192.  
  193. <BR>
  194. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an OutputStream for the data.</TD>
  195. </TR>
  196. <TR BGCOLOR="white" CLASS="TableRowColor">
  197. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  198. <CODE>&nbsp;void</CODE></FONT></TD>
  199. <TD><CODE><B><A HREF="../../../javax/mail/util/ByteArrayDataSource.html#setName(java.lang.String)">setName</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>
  200.  
  201. <BR>
  202. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the name of the data.</TD>
  203. </TR>
  204. </TABLE>
  205. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  206. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  207. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  208. <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>
  209. </TR>
  210. <TR BGCOLOR="white" CLASS="TableRowColor">
  211. <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>
  212. </TR>
  213. </TABLE>
  214. &nbsp;
  215. <P>
  216.  
  217. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  218.  
  219. <A NAME="constructor_detail"><!-- --></A>
  220. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  221. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  222. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  223. <B>Constructor Detail</B></FONT></TH>
  224. </TR>
  225. </TABLE>
  226.  
  227. <A NAME="ByteArrayDataSource(java.io.InputStream, java.lang.String)"><!-- --></A><H3>
  228. ByteArrayDataSource</H3>
  229. <PRE>
  230. public <B>ByteArrayDataSource</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,
  231.                            <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)
  232.                     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></PRE>
  233. <DL>
  234. <DD>Create a ByteArrayDataSource with data from the
  235.  specified InputStream and with the specified MIME type.
  236.  The InputStream is read completely and the data is
  237.  stored in a byte array.
  238. <P>
  239. <DL>
  240. <DT><B>Parameters:</B><DD><CODE>is</CODE> - the InputStream<DD><CODE>type</CODE> - the MIME type
  241. <DT><B>Throws:</B>
  242. <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> - errors reading the stream</DL>
  243. </DL>
  244. <HR>
  245.  
  246. <A NAME="ByteArrayDataSource(byte[], java.lang.String)"><!-- --></A><H3>
  247. ByteArrayDataSource</H3>
  248. <PRE>
  249. public <B>ByteArrayDataSource</B>(byte[]&nbsp;data,
  250.                            <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)</PRE>
  251. <DL>
  252. <DD>Create a ByteArrayDataSource with data from the
  253.  specified byte array and with the specified MIME type.
  254. <P>
  255. <DL>
  256. <DT><B>Parameters:</B><DD><CODE>data</CODE> - the data<DD><CODE>type</CODE> - the MIME type</DL>
  257. </DL>
  258. <HR>
  259.  
  260. <A NAME="ByteArrayDataSource(java.lang.String, java.lang.String)"><!-- --></A><H3>
  261. ByteArrayDataSource</H3>
  262. <PRE>
  263. public <B>ByteArrayDataSource</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;data,
  264.                            <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)
  265.                     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></PRE>
  266. <DL>
  267. <DD>Create a ByteArrayDataSource with data from the
  268.  specified String and with the specified MIME type.
  269.  The MIME type should include a <code>charset</code>
  270.  parameter specifying the charset to be used for the
  271.  string.  If the parameter is not included, the
  272.  default charset is used.
  273. <P>
  274. <DL>
  275. <DT><B>Parameters:</B><DD><CODE>data</CODE> - the String<DD><CODE>type</CODE> - the MIME type
  276. <DT><B>Throws:</B>
  277. <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> - errors reading the String</DL>
  278. </DL>
  279.  
  280. <!-- ============ METHOD DETAIL ========== -->
  281.  
  282. <A NAME="method_detail"><!-- --></A>
  283. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  284. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  285. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  286. <B>Method Detail</B></FONT></TH>
  287. </TR>
  288. </TABLE>
  289.  
  290. <A NAME="getInputStream()"><!-- --></A><H3>
  291. getInputStream</H3>
  292. <PRE>
  293. 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>()
  294.                            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></PRE>
  295. <DL>
  296. <DD>Return an InputStream for the data.
  297.  Note that a new stream is returned each time
  298.  this method is called.
  299. <P>
  300. <DD><DL>
  301. <DT><B>Specified by:</B><DD><CODE><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></CODE> in interface <CODE><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></CODE></DL>
  302. </DD>
  303. <DD><DL>
  304.  
  305. <DT><B>Returns:</B><DD>the InputStream
  306. <DT><B>Throws:</B>
  307. <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 no data has been set</DL>
  308. </DD>
  309. </DL>
  310. <HR>
  311.  
  312. <A NAME="getOutputStream()"><!-- --></A><H3>
  313. getOutputStream</H3>
  314. <PRE>
  315. public <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> <B>getOutputStream</B>()
  316.                              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></PRE>
  317. <DL>
  318. <DD>Return an OutputStream for the data.
  319.  Writing the data is not supported; an <code>IOException</code>
  320.  is always thrown.
  321. <P>
  322. <DD><DL>
  323. <DT><B>Specified by:</B><DD><CODE><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> in interface <CODE><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></CODE></DL>
  324. </DD>
  325. <DD><DL>
  326.  
  327. <DT><B>Throws:</B>
  328. <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> - always</DL>
  329. </DD>
  330. </DL>
  331. <HR>
  332.  
  333. <A NAME="getContentType()"><!-- --></A><H3>
  334. getContentType</H3>
  335. <PRE>
  336. 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>
  337. <DL>
  338. <DD>Get the MIME content type of the data.
  339. <P>
  340. <DD><DL>
  341. <DT><B>Specified by:</B><DD><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></CODE> in interface <CODE><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></CODE></DL>
  342. </DD>
  343. <DD><DL>
  344.  
  345. <DT><B>Returns:</B><DD>the MIME type</DL>
  346. </DD>
  347. </DL>
  348. <HR>
  349.  
  350. <A NAME="getName()"><!-- --></A><H3>
  351. getName</H3>
  352. <PRE>
  353. 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>getName</B>()</PRE>
  354. <DL>
  355. <DD>Get the name of the data.
  356.  By default, an empty string ("") is returned.
  357. <P>
  358. <DD><DL>
  359. <DT><B>Specified by:</B><DD><CODE><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></CODE> in interface <CODE><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></CODE></DL>
  360. </DD>
  361. <DD><DL>
  362.  
  363. <DT><B>Returns:</B><DD>the name of this data</DL>
  364. </DD>
  365. </DL>
  366. <HR>
  367.  
  368. <A NAME="setName(java.lang.String)"><!-- --></A><H3>
  369. setName</H3>
  370. <PRE>
  371. public void <B>setName</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)</PRE>
  372. <DL>
  373. <DD>Set the name of the data.
  374. <P>
  375. <DD><DL>
  376. </DL>
  377. </DD>
  378. <DD><DL>
  379. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of this data</DL>
  380. </DD>
  381. </DL>
  382. <!-- ========= END OF CLASS DATA ========= -->
  383. <HR>
  384.  
  385.  
  386. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  387. <A NAME="navbar_bottom"><!-- --></A>
  388. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  389. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  390. <TR>
  391. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  392. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  393. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  394.   <TR ALIGN="center" VALIGN="top">
  395.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  396.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  397.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  398.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ByteArrayDataSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  399.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  400.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  401.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  402.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  403.   </TR>
  404. </TABLE>
  405. </TD>
  406. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  407. </EM>
  408. </TD>
  409. </TR>
  410.  
  411. <TR>
  412. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  413. &nbsp;PREV CLASS&nbsp;
  414. &nbsp;<A HREF="../../../javax/mail/util/SharedByteArrayInputStream.html" title="class in javax.mail.util"><B>NEXT CLASS</B></A></FONT></TD>
  415. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  416.   <A HREF="../../../index.html?javax/mail/util/ByteArrayDataSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  417. &nbsp;<A HREF="ByteArrayDataSource.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  418. &nbsp;<SCRIPT type="text/javascript">
  419.   <!--
  420.   if(window==top) {
  421.     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  422.   }
  423.   //-->
  424. </SCRIPT>
  425. <NOSCRIPT>
  426.   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  427. </NOSCRIPT>
  428.  
  429.  
  430. </FONT></TD>
  431. </TR>
  432. <TR>
  433. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  434.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  435. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  436. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  437. </TR>
  438. </TABLE>
  439. <A NAME="skip-navbar_bottom"></A>
  440. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  441.  
  442. <HR>
  443. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  444. </BODY>
  445. </HTML>
  446.