sharedfileinputstream.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 826 行 · 第 1/3 页

HTML
826
字号
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#mark(int)">mark</A></B>(int&nbsp;readlimit)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>mark</code> method of <code>InputStream</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#markSupported()">markSupported</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests if this input stream supports the <code>mark</code>  and <code>reset</code> methods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#newStream(long, long)">newStream</A></B>(long&nbsp;start,          long&nbsp;end)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a new InputStream representing a subset of the data from this InputStream, starting at <code>start</code> (inclusive) up to <code>end</code> (exclusive).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#read()">read</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>read</code> method of <code>InputStream</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#read(byte[], int, int)">read</A></B>(byte[]&nbsp;b,     int&nbsp;off,     int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads bytes from this stream into the specified byte array, starting at the given offset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#reset()">reset</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>reset</code> method of <code>InputStream</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/mail/util/SharedFileInputStream.html#skip(long)">skip</A></B>(long&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the general contract of the <code>skip</code> method of <code>InputStream</code>.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterInputStream"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/FilterInputStream.html" title="class or interface in java.io">FilterInputStream</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/FilterInputStream.html#read(byte[])" title="class or interface in java.io">read</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="in"><!-- --></A><H3>in</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/RandomAccessFile.html" title="class or interface in java.io">RandomAccessFile</A> <B>in</B></PRE><DL><DD>The file containing the data. Shared by all related SharedFileInputStreams.<P><DL></DL></DL><HR><A NAME="bufsize"><!-- --></A><H3>bufsize</H3><PRE>protected int <B>bufsize</B></PRE><DL><DD>The normal size of the read buffer.<P><DL></DL></DL><HR><A NAME="bufpos"><!-- --></A><H3>bufpos</H3><PRE>protected long <B>bufpos</B></PRE><DL><DD>The file offset that corresponds to the first byte in the read buffer.<P><DL></DL></DL><HR><A NAME="start"><!-- --></A><H3>start</H3><PRE>protected long <B>start</B></PRE><DL><DD>The file offset of the start of data in this subset of the file.<P><DL></DL></DL><HR><A NAME="datalen"><!-- --></A><H3>datalen</H3><PRE>protected long <B>datalen</B></PRE><DL><DD>The amount of data in this subset of the file.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="SharedFileInputStream(java.io.File)"><!-- --></A><H3>SharedFileInputStream</H3><PRE>public <B>SharedFileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;file)                      throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Creates a <code>SharedFileInputStream</code> for the file.<P><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DL><HR><A NAME="SharedFileInputStream(java.lang.String)"><!-- --></A><H3>SharedFileInputStream</H3><PRE>public <B>SharedFileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;file)                      throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Creates a <code>SharedFileInputStream</code> for the named file<P><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DL><HR><A NAME="SharedFileInputStream(java.io.File, int)"><!-- --></A><H3>SharedFileInputStream</H3><PRE>public <B>SharedFileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;file,                             int&nbsp;size)                      throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Creates a <code>SharedFileInputStream</code> with the specified buffer size.<P><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>size</CODE> - the buffer size.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if size <= 0.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DL><HR><A NAME="SharedFileInputStream(java.lang.String, int)"><!-- --></A><H3>SharedFileInputStream</H3><PRE>public <B>SharedFileInputStream</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;file,                             int&nbsp;size)                      throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Creates a <code>SharedFileInputStream</code> with the specified buffer size.<P><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>size</CODE> - the buffer size.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if size <= 0.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="read()"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>()         throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>See the general contract of the <code>read</code> method of <code>InputStream</code>.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/BufferedInputStream.html#read()" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/BufferedInputStream.html" title="class or interface in java.io">BufferedInputStream</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the next byte of data, or <code>-1</code> if the end of the             stream is reached.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="read(byte[], int, int)"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(byte[]&nbsp;b,                int&nbsp;off,                int&nbsp;len)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?