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. SharedFileInputStream (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="SharedFileInputStream (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/SharedFileInputStream.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/util/SharedByteArrayInputStream.html" title="class in javax.mail.util"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;NEXT CLASS</FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../../index.html?javax/mail/util/SharedFileInputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="SharedFileInputStream.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.util</FONT>
  93. <BR>
  94. Class SharedFileInputStream</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="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</A>
  98.       <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</A>
  99.           <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">java.io.BufferedInputStream</A>
  100.               <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.mail.util.SharedFileInputStream</B>
  101. </PRE>
  102. <DL>
  103. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>, <A HREF="../../../javax/mail/internet/SharedInputStream.html" title="interface in javax.mail.internet">SharedInputStream</A></DD>
  104. </DL>
  105. <HR>
  106. <DL>
  107. <DT><PRE>public class <B>SharedFileInputStream</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A><DT>implements <A HREF="../../../javax/mail/internet/SharedInputStream.html" title="interface in javax.mail.internet">SharedInputStream</A></DL>
  108. </PRE>
  109.  
  110. <P>
  111. A <code>SharedFileInputStream</code> is a
  112.  <code>BufferedInputStream</code> that buffers
  113.  data from the file and supports the <code>mark</code>
  114.  and <code>reset</code> methods.  It also supports the
  115.  <code>newStream</code> method that allows you to create
  116.  other streams that represent subsets of the file.
  117.  A <code>RandomAccessFile</code> object is used to
  118.  access the file data. <p>
  119.  
  120.  Note that when the SharedFileInputStream is closed,
  121.  all streams created with the <code>newStream</code>
  122.  method are also closed.  This allows the creator of the
  123.  SharedFileInputStream object to control access to the
  124.  underlying file and ensure that it is closed when
  125.  needed, to avoid leaking file descriptors.  Note also
  126.  that this behavior contradicts the requirements of
  127.  SharedInputStream and may change in a future release.
  128. <P>
  129.  
  130. <P>
  131. <DL>
  132. <DT><B>Since:</B></DT>
  133.   <DD>JavaMail 1.4</DD>
  134. </DL>
  135. <HR>
  136.  
  137. <P>
  138. <!-- =========== FIELD SUMMARY =========== -->
  139.  
  140. <A NAME="field_summary"><!-- --></A>
  141. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  142. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  143. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  144. <B>Field Summary</B></FONT></TH>
  145. </TR>
  146. <TR BGCOLOR="white" CLASS="TableRowColor">
  147. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  148. <CODE>protected &nbsp;long</CODE></FONT></TD>
  149. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#bufpos">bufpos</A></B></CODE>
  150.  
  151. <BR>
  152. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The file offset that corresponds to the first byte in
  153.  the read buffer.</TD>
  154. </TR>
  155. <TR BGCOLOR="white" CLASS="TableRowColor">
  156. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  157. <CODE>protected &nbsp;int</CODE></FONT></TD>
  158. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#bufsize">bufsize</A></B></CODE>
  159.  
  160. <BR>
  161. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The normal size of the read buffer.</TD>
  162. </TR>
  163. <TR BGCOLOR="white" CLASS="TableRowColor">
  164. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  165. <CODE>protected &nbsp;long</CODE></FONT></TD>
  166. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#datalen">datalen</A></B></CODE>
  167.  
  168. <BR>
  169. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The amount of data in this subset of the file.</TD>
  170. </TR>
  171. <TR BGCOLOR="white" CLASS="TableRowColor">
  172. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  173. <CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/RandomAccessFile.html?is-external=true" title="class or interface in java.io">RandomAccessFile</A></CODE></FONT></TD>
  174. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#in">in</A></B></CODE>
  175.  
  176. <BR>
  177. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The file containing the data.</TD>
  178. </TR>
  179. <TR BGCOLOR="white" CLASS="TableRowColor">
  180. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  181. <CODE>protected &nbsp;long</CODE></FONT></TD>
  182. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#start">start</A></B></CODE>
  183.  
  184. <BR>
  185. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The file offset of the start of data in this subset of the file.</TD>
  186. </TR>
  187. </TABLE>
  188. &nbsp;<A NAME="fields_inherited_from_class_java.io.BufferedInputStream"><!-- --></A>
  189. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  190. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  191. <TH ALIGN="left"><B>Fields inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></B></TH>
  192. </TR>
  193. <TR BGCOLOR="white" CLASS="TableRowColor">
  194. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#buf" title="class or interface in java.io">buf</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#count" title="class or interface in java.io">count</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#marklimit" title="class or interface in java.io">marklimit</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#markpos" title="class or interface in java.io">markpos</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#pos" title="class or interface in java.io">pos</A></CODE></TD>
  195. </TR>
  196. </TABLE>
  197. &nbsp;
  198. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  199.  
  200. <A NAME="constructor_summary"><!-- --></A>
  201. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  202. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  203. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  204. <B>Constructor Summary</B></FONT></TH>
  205. </TR>
  206. <TR BGCOLOR="white" CLASS="TableRowColor">
  207. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#SharedFileInputStream(java.io.File)">SharedFileInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file)</CODE>
  208.  
  209. <BR>
  210. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>SharedFileInputStream</code>
  211.  for the file.</TD>
  212. </TR>
  213. <TR BGCOLOR="white" CLASS="TableRowColor">
  214. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#SharedFileInputStream(java.io.File, int)">SharedFileInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file,
  215.                       int&nbsp;size)</CODE>
  216.  
  217. <BR>
  218. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>SharedFileInputStream</code>
  219.  with the specified buffer size.</TD>
  220. </TR>
  221. <TR BGCOLOR="white" CLASS="TableRowColor">
  222. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#SharedFileInputStream(java.lang.String)">SharedFileInputStream</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;file)</CODE>
  223.  
  224. <BR>
  225. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>SharedFileInputStream</code>
  226.  for the named file</TD>
  227. </TR>
  228. <TR BGCOLOR="white" CLASS="TableRowColor">
  229. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#SharedFileInputStream(java.lang.String, int)">SharedFileInputStream</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;file,
  230.                       int&nbsp;size)</CODE>
  231.  
  232. <BR>
  233. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>SharedFileInputStream</code>
  234.  with the specified buffer size.</TD>
  235. </TR>
  236. </TABLE>
  237. &nbsp;
  238. <!-- ========== METHOD SUMMARY =========== -->
  239.  
  240. <A NAME="method_summary"><!-- --></A>
  241. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  242. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  243. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  244. <B>Method Summary</B></FONT></TH>
  245. </TR>
  246. <TR BGCOLOR="white" CLASS="TableRowColor">
  247. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  248. <CODE>&nbsp;int</CODE></FONT></TD>
  249. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#available()">available</A></B>()</CODE>
  250.  
  251. <BR>
  252. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that can be read from this input
  253.  stream without blocking.</TD>
  254. </TR>
  255. <TR BGCOLOR="white" CLASS="TableRowColor">
  256. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  257. <CODE>&nbsp;void</CODE></FONT></TD>
  258. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#close()">close</A></B>()</CODE>
  259.  
  260. <BR>
  261. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes this input stream and releases any system resources
  262.  associated with the stream.</TD>
  263. </TR>
  264. <TR BGCOLOR="white" CLASS="TableRowColor">
  265. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  266. <CODE>protected &nbsp;void</CODE></FONT></TD>
  267. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#finalize()">finalize</A></B>()</CODE>
  268.  
  269. <BR>
  270. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Force this stream to close.</TD>
  271. </TR>
  272. <TR BGCOLOR="white" CLASS="TableRowColor">
  273. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  274. <CODE>&nbsp;long</CODE></FONT></TD>
  275. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#getPosition()">getPosition</A></B>()</CODE>
  276.  
  277. <BR>
  278. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the current position in the InputStream, as an
  279.  offset from the beginning of the InputStream.</TD>
  280. </TR>
  281. <TR BGCOLOR="white" CLASS="TableRowColor">
  282. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  283. <CODE>&nbsp;void</CODE></FONT></TD>
  284. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#mark(int)">mark</A></B>(int&nbsp;readlimit)</CODE>
  285.  
  286. <BR>
  287. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>mark</code>
  288.  method of <code>InputStream</code>.</TD>
  289. </TR>
  290. <TR BGCOLOR="white" CLASS="TableRowColor">
  291. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  292. <CODE>&nbsp;boolean</CODE></FONT></TD>
  293. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#markSupported()">markSupported</A></B>()</CODE>
  294.  
  295. <BR>
  296. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests if this input stream supports the <code>mark</code>
  297.  and <code>reset</code> methods.</TD>
  298. </TR>
  299. <TR BGCOLOR="white" CLASS="TableRowColor">
  300. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  301. <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>
  302. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#newStream(long, long)">newStream</A></B>(long&nbsp;start,
  303.           long&nbsp;end)</CODE>
  304.  
  305. <BR>
  306. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a new InputStream representing a subset of the data
  307.  from this InputStream, starting at <code>start</code> (inclusive)
  308.  up to <code>end</code> (exclusive).</TD>
  309. </TR>
  310. <TR BGCOLOR="white" CLASS="TableRowColor">
  311. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  312. <CODE>&nbsp;int</CODE></FONT></TD>
  313. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#read()">read</A></B>()</CODE>
  314.  
  315. <BR>
  316. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>read</code>
  317.  method of <code>InputStream</code>.</TD>
  318. </TR>
  319. <TR BGCOLOR="white" CLASS="TableRowColor">
  320. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  321. <CODE>&nbsp;int</CODE></FONT></TD>
  322. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#read(byte[], int, int)">read</A></B>(byte[]&nbsp;b,
  323.      int&nbsp;off,
  324.      int&nbsp;len)</CODE>
  325.  
  326. <BR>
  327. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads bytes from this stream into the specified byte array,
  328.  starting at the given offset.</TD>
  329. </TR>
  330. <TR BGCOLOR="white" CLASS="TableRowColor">
  331. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  332. <CODE>&nbsp;void</CODE></FONT></TD>
  333. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#reset()">reset</A></B>()</CODE>
  334.  
  335. <BR>
  336. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>reset</code>
  337.  method of <code>InputStream</code>.</TD>
  338. </TR>
  339. <TR BGCOLOR="white" CLASS="TableRowColor">
  340. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  341. <CODE>&nbsp;long</CODE></FONT></TD>
  342. <TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#skip(long)">skip</A></B>(long&nbsp;n)</CODE>
  343.  
  344. <BR>
  345. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>skip</code>
  346.  method of <code>InputStream</code>.</TD>
  347. </TR>
  348. </TABLE>
  349. &nbsp;<A NAME="methods_inherited_from_class_java.io.FilterInputStream"><!-- --></A>
  350. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  351. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  352. <TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</A></B></TH>
  353. </TR>
  354. <TR BGCOLOR="white" CLASS="TableRowColor">
  355. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilterInputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</A></CODE></TD>
  356. </TR>
  357. </TABLE>
  358. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  359. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  360. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  361. <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>
  362. </TR>
  363. <TR BGCOLOR="white" CLASS="TableRowColor">
  364. <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#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>
  365. </TR>
  366. </TABLE>
  367. &nbsp;
  368. <P>
  369.  
  370. <!-- ============ FIELD DETAIL =========== -->
  371.  
  372. <A NAME="field_detail"><!-- --></A>
  373. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  374. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  375. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  376. <B>Field Detail</B></FONT></TH>
  377. </TR>
  378. </TABLE>
  379.  
  380. <A NAME="in"><!-- --></A><H3>
  381. in</H3>
  382. <PRE>
  383. protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/RandomAccessFile.html?is-external=true" title="class or interface in java.io">RandomAccessFile</A> <B>in</B></PRE>
  384. <DL>
  385. <DD>The file containing the data.
  386.  Shared by all related SharedFileInputStreams.
  387. <P>
  388. <DL>
  389. </DL>
  390. </DL>
  391. <HR>
  392.  
  393. <A NAME="bufsize"><!-- --></A><H3>
  394. bufsize</H3>
  395. <PRE>
  396. protected int <B>bufsize</B></PRE>
  397. <DL>
  398. <DD>The normal size of the read buffer.
  399. <P>
  400. <DL>
  401. </DL>
  402. </DL>
  403. <HR>
  404.  
  405. <A NAME="bufpos"><!-- --></A><H3>
  406. bufpos</H3>
  407. <PRE>
  408. protected long <B>bufpos</B></PRE>
  409. <DL>
  410. <DD>The file offset that corresponds to the first byte in
  411.  the read buffer.
  412. <P>
  413. <DL>
  414. </DL>
  415. </DL>
  416. <HR>
  417.  
  418. <A NAME="start"><!-- --></A><H3>
  419. start</H3>
  420. <PRE>
  421. protected long <B>start</B></PRE>
  422. <DL>
  423. <DD>The file offset of the start of data in this subset of the file.
  424. <P>
  425. <DL>
  426. </DL>
  427. </DL>
  428. <HR>
  429.  
  430. <A NAME="datalen"><!-- --></A><H3>
  431. datalen</H3>
  432. <PRE>
  433. protected long <B>datalen</B></PRE>
  434. <DL>
  435. <DD>The amount of data in this subset of the file.
  436. <P>
  437. <DL>
  438. </DL>
  439. </DL>
  440.  
  441. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  442.  
  443. <A NAME="constructor_detail"><!-- --></A>
  444. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  445. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  446. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  447. <B>Constructor Detail</B></FONT></TH>
  448. </TR>
  449. </TABLE>
  450.  
  451. <A NAME="SharedFileInputStream(java.io.File)"><!-- --></A><H3>
  452. SharedFileInputStream</H3>
  453. <PRE>
  454. public <B>SharedFileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file)
  455.                       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>
  456. <DL>
  457. <DD>Creates a <code>SharedFileInputStream</code>
  458.  for the file.
  459. <P>
  460. <DL>
  461. <DT><B>Parameters:</B><DD><CODE>file</CODE> - the file
  462. <DT><B>Throws:</B>
  463. <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></DL>
  464. </DL>
  465. <HR>
  466.  
  467. <A NAME="SharedFileInputStream(java.lang.String)"><!-- --></A><H3>
  468. SharedFileInputStream</H3>
  469. <PRE>
  470. public <B>SharedFileInputStream</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;file)
  471.                       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>
  472. <DL>
  473. <DD>Creates a <code>SharedFileInputStream</code>
  474.  for the named file
  475. <P>
  476. <DL>
  477. <DT><B>Parameters:</B><DD><CODE>file</CODE> - the file
  478. <DT><B>Throws:</B>
  479. <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></DL>
  480. </DL>
  481. <HR>
  482.  
  483. <A NAME="SharedFileInputStream(java.io.File, int)"><!-- --></A><H3>
  484. SharedFileInputStream</H3>
  485. <PRE>
  486. public <B>SharedFileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file,
  487.                              int&nbsp;size)
  488.                       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>
  489. <DL>
  490. <DD>Creates a <code>SharedFileInputStream</code>
  491.  with the specified buffer size.
  492. <P>
  493. <DL>
  494. <DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>size</CODE> - the buffer size.
  495. <DT><B>Throws:</B>
  496. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if size <= 0.
  497. <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></DL>
  498. </DL>
  499. <HR>
  500.  
  501. <A NAME="SharedFileInputStream(java.lang.String, int)"><!-- --></A><H3>
  502. SharedFileInputStream</H3>
  503. <PRE>
  504. public <B>SharedFileInputStream</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;file,
  505.                              int&nbsp;size)
  506.                       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>
  507. <DL>
  508. <DD>Creates a <code>SharedFileInputStream</code>
  509.  with the specified buffer size.
  510. <P>
  511. <DL>
  512. <DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>size</CODE> - the buffer size.
  513. <DT><B>Throws:</B>
  514. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if size <= 0.
  515. <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></DL>
  516. </DL>
  517.  
  518. <!-- ============ METHOD DETAIL ========== -->
  519.  
  520. <A NAME="method_detail"><!-- --></A>
  521. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  522. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  523. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  524. <B>Method Detail</B></FONT></TH>
  525. </TR>
  526. </TABLE>
  527.  
  528. <A NAME="read()"><!-- --></A><H3>
  529. read</H3>
  530. <PRE>
  531. public int <B>read</B>()
  532.          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>
  533. <DL>
  534. <DD>See the general contract of the <code>read</code>
  535.  method of <code>InputStream</code>.
  536. <P>
  537. <DD><DL>
  538. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#read()" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  539. </DD>
  540. <DD><DL>
  541.  
  542. <DT><B>Returns:</B><DD>the next byte of data, or <code>-1</code> if the end of the
  543.              stream is reached.
  544. <DT><B>Throws:</B>
  545. <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 I/O error occurs.</DL>
  546. </DD>
  547. </DL>
  548. <HR>
  549.  
  550. <A NAME="read(byte[], int, int)"><!-- --></A><H3>
  551. read</H3>
  552. <PRE>
  553. public int <B>read</B>(byte[]&nbsp;b,
  554.                 int&nbsp;off,
  555.                 int&nbsp;len)
  556.          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>
  557. <DL>
  558. <DD>Reads bytes from this stream into the specified byte array,
  559.  starting at the given offset.
  560.  
  561.  <p> This method implements the general contract of the corresponding
  562.  <code><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io"><CODE>read</CODE></A></code>
  563.  method of the <code><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><CODE>InputStream</CODE></A></code> class.
  564. <P>
  565. <DD><DL>
  566. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  567. </DD>
  568. <DD><DL>
  569. <DT><B>Parameters:</B><DD><CODE>b</CODE> - destination buffer.<DD><CODE>off</CODE> - offset at which to start storing bytes.<DD><CODE>len</CODE> - maximum number of bytes to read.
  570. <DT><B>Returns:</B><DD>the number of bytes read, or <code>-1</code> if the end of
  571.              the stream has been reached.
  572. <DT><B>Throws:</B>
  573. <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 I/O error occurs.</DL>
  574. </DD>
  575. </DL>
  576. <HR>
  577.  
  578. <A NAME="skip(long)"><!-- --></A><H3>
  579. skip</H3>
  580. <PRE>
  581. public long <B>skip</B>(long&nbsp;n)
  582.           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>
  583. <DL>
  584. <DD>See the general contract of the <code>skip</code>
  585.  method of <code>InputStream</code>.
  586. <P>
  587. <DD><DL>
  588. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#skip(long)" title="class or interface in java.io">skip</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  589. </DD>
  590. <DD><DL>
  591. <DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of bytes to be skipped.
  592. <DT><B>Returns:</B><DD>the actual number of bytes skipped.
  593. <DT><B>Throws:</B>
  594. <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 I/O error occurs.</DL>
  595. </DD>
  596. </DL>
  597. <HR>
  598.  
  599. <A NAME="available()"><!-- --></A><H3>
  600. available</H3>
  601. <PRE>
  602. public int <B>available</B>()
  603.               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>
  604. <DL>
  605. <DD>Returns the number of bytes that can be read from this input
  606.  stream without blocking.
  607. <P>
  608. <DD><DL>
  609. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#available()" title="class or interface in java.io">available</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  610. </DD>
  611. <DD><DL>
  612.  
  613. <DT><B>Returns:</B><DD>the number of bytes that can be read from this input
  614.              stream without blocking.
  615. <DT><B>Throws:</B>
  616. <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 I/O error occurs.</DL>
  617. </DD>
  618. </DL>
  619. <HR>
  620.  
  621. <A NAME="mark(int)"><!-- --></A><H3>
  622. mark</H3>
  623. <PRE>
  624. public void <B>mark</B>(int&nbsp;readlimit)</PRE>
  625. <DL>
  626. <DD>See the general contract of the <code>mark</code>
  627.  method of <code>InputStream</code>.
  628. <P>
  629. <DD><DL>
  630. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  631. </DD>
  632. <DD><DL>
  633. <DT><B>Parameters:</B><DD><CODE>readlimit</CODE> - the maximum limit of bytes that can be read before
  634.                       the mark position becomes invalid.<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/util/SharedFileInputStream.html#reset()"><CODE>reset()</CODE></A></DL>
  635. </DD>
  636. </DL>
  637. <HR>
  638.  
  639. <A NAME="reset()"><!-- --></A><H3>
  640. reset</H3>
  641. <PRE>
  642. public void <B>reset</B>()
  643.            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>
  644. <DL>
  645. <DD>See the general contract of the <code>reset</code>
  646.  method of <code>InputStream</code>.
  647.  <p>
  648.  If <code>markpos</code> is <code>-1</code>
  649.  (no mark has been set or the mark has been
  650.  invalidated), an <code>IOException</code>
  651.  is thrown. Otherwise, <code>pos</code> is
  652.  set equal to <code>markpos</code>.
  653. <P>
  654. <DD><DL>
  655. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  656. </DD>
  657. <DD><DL>
  658.  
  659. <DT><B>Throws:</B>
  660. <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 this stream has not been marked or
  661.                if the mark has been invalidated.<DT><B>See Also:</B><DD><A HREF="../../../javax/mail/util/SharedFileInputStream.html#mark(int)"><CODE>mark(int)</CODE></A></DL>
  662. </DD>
  663. </DL>
  664. <HR>
  665.  
  666. <A NAME="markSupported()"><!-- --></A><H3>
  667. markSupported</H3>
  668. <PRE>
  669. public boolean <B>markSupported</B>()</PRE>
  670. <DL>
  671. <DD>Tests if this input stream supports the <code>mark</code>
  672.  and <code>reset</code> methods. The <code>markSupported</code>
  673.  method of <code>SharedFileInputStream</code> returns
  674.  <code>true</code>.
  675. <P>
  676. <DD><DL>
  677. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  678. </DD>
  679. <DD><DL>
  680.  
  681. <DT><B>Returns:</B><DD>a <code>boolean</code> indicating if this stream type supports
  682.           the <code>mark</code> and <code>reset</code> methods.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io"><CODE>InputStream.mark(int)</CODE></A>,
  683. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io"><CODE>InputStream.reset()</CODE></A></DL>
  684. </DD>
  685. </DL>
  686. <HR>
  687.  
  688. <A NAME="close()"><!-- --></A><H3>
  689. close</H3>
  690. <PRE>
  691. public void <B>close</B>()
  692.            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>
  693. <DL>
  694. <DD>Closes this input stream and releases any system resources
  695.  associated with the stream.
  696. <P>
  697. <DD><DL>
  698. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</A></CODE></DL>
  699. </DD>
  700. <DD><DL>
  701.  
  702. <DT><B>Throws:</B>
  703. <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 I/O error occurs.</DL>
  704. </DD>
  705. </DL>
  706. <HR>
  707.  
  708. <A NAME="getPosition()"><!-- --></A><H3>
  709. getPosition</H3>
  710. <PRE>
  711. public long <B>getPosition</B>()</PRE>
  712. <DL>
  713. <DD>Return the current position in the InputStream, as an
  714.  offset from the beginning of the InputStream.
  715. <P>
  716. <DD><DL>
  717. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/internet/SharedInputStream.html#getPosition()">getPosition</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/SharedInputStream.html" title="interface in javax.mail.internet">SharedInputStream</A></CODE></DL>
  718. </DD>
  719. <DD><DL>
  720.  
  721. <DT><B>Returns:</B><DD>the current position</DL>
  722. </DD>
  723. </DL>
  724. <HR>
  725.  
  726. <A NAME="newStream(long, long)"><!-- --></A><H3>
  727. newStream</H3>
  728. <PRE>
  729. 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>newStream</B>(long&nbsp;start,
  730.                              long&nbsp;end)</PRE>
  731. <DL>
  732. <DD>Return a new InputStream representing a subset of the data
  733.  from this InputStream, starting at <code>start</code> (inclusive)
  734.  up to <code>end</code> (exclusive).  <code>start</code> must be
  735.  non-negative.  If <code>end</code> is -1, the new stream ends
  736.  at the same place as this stream.  The returned InputStream
  737.  will also implement the SharedInputStream interface.
  738. <P>
  739. <DD><DL>
  740. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/mail/internet/SharedInputStream.html#newStream(long, long)">newStream</A></CODE> in interface <CODE><A HREF="../../../javax/mail/internet/SharedInputStream.html" title="interface in javax.mail.internet">SharedInputStream</A></CODE></DL>
  741. </DD>
  742. <DD><DL>
  743. <DT><B>Parameters:</B><DD><CODE>start</CODE> - the starting position<DD><CODE>end</CODE> - the ending position + 1
  744. <DT><B>Returns:</B><DD>the new stream</DL>
  745. </DD>
  746. </DL>
  747. <HR>
  748.  
  749. <A NAME="finalize()"><!-- --></A><H3>
  750. finalize</H3>
  751. <PRE>
  752. protected void <B>finalize</B>()
  753.                  throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></PRE>
  754. <DL>
  755. <DD>Force this stream to close.
  756. <P>
  757. <DD><DL>
  758. <DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
  759. </DD>
  760. <DD><DL>
  761.  
  762. <DT><B>Throws:</B>
  763. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></CODE></DL>
  764. </DD>
  765. </DL>
  766. <!-- ========= END OF CLASS DATA ========= -->
  767. <HR>
  768.  
  769.  
  770. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  771. <A NAME="navbar_bottom"><!-- --></A>
  772. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  773. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  774. <TR>
  775. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  776. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  777. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  778.   <TR ALIGN="center" VALIGN="top">
  779.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  780.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  781.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  782.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SharedFileInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  783.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  784.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  785.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  786.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  787.   </TR>
  788. </TABLE>
  789. </TD>
  790. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  791. </EM>
  792. </TD>
  793. </TR>
  794.  
  795. <TR>
  796. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  797. &nbsp;<A HREF="../../../javax/mail/util/SharedByteArrayInputStream.html" title="class in javax.mail.util"><B>PREV CLASS</B></A>&nbsp;
  798. &nbsp;NEXT CLASS</FONT></TD>
  799. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  800.   <A HREF="../../../index.html?javax/mail/util/SharedFileInputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  801. &nbsp;<A HREF="SharedFileInputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  802. &nbsp;<SCRIPT type="text/javascript">
  803.   <!--
  804.   if(window==top) {
  805.     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  806.   }
  807.   //-->
  808. </SCRIPT>
  809. <NOSCRIPT>
  810.   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  811. </NOSCRIPT>
  812.  
  813.  
  814. </FONT></TD>
  815. </TR>
  816. <TR>
  817. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  818.   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>
  819. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  820. 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>
  821. </TR>
  822. </TABLE>
  823. <A NAME="skip-navbar_bottom"></A>
  824. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  825.  
  826. <HR>
  827. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  828. </BODY>
  829. </HTML>
  830.