📄 sequenceinputstream.html
字号:
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="SequenceInputStream(java.util.Enumeration)"><!-- --></A><H3>SequenceInputStream</H3><PRE>public <B>SequenceInputStream</B>(<A HREF="../../java/util/Enumeration.html">Enumeration</A> e)</PRE><DL><DD>Initializes a newly created <code>SequenceInputStream</code> by remembering the argument, which must be an <code>Enumeration</code> that produces objects whose run-time type is <code>InputStream</code>. The input streams that are produced by the enumeration will be read, in order, to provide the bytes to be read from this <code>SequenceInputStream</code>. After each input stream from the enumeration is exhausted, it is closed by calling its <code>close</code> method.<DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - an enumeration of input streams.<DT><B>See Also: </B><DD><A HREF="../../java/util/Enumeration.html"><CODE>Enumeration</CODE></A></DL></DD></DL><HR><A NAME="SequenceInputStream(java.io.InputStream, java.io.InputStream)"><!-- --></A><H3>SequenceInputStream</H3><PRE>public <B>SequenceInputStream</B>(<A HREF="../../java/io/InputStream.html">InputStream</A> s1, <A HREF="../../java/io/InputStream.html">InputStream</A> s2)</PRE><DL><DD>Initializes a newly created <code>SequenceInputStream</code> by remembering the two arguments, which will be read in order, first <code>s1</code> and then <code>s2</code>, to provide the bytes to be read from this <code>SequenceInputStream</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>s1</CODE> - the first input stream to read.<DD><CODE>s2</CODE> - the second input stream to read.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="available()"><!-- --></A><H3>available</H3><PRE>public int <B>available</B>() throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Returns the number of bytes available on the current stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/InputStream.html#available()">available</A></CODE> in class <CODE><A HREF="../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="read()"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>() throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Reads the next byte of data from this input stream. The byte is returned as an <code>int</code> in the range <code>0</code> to <code>255</code>. If no byte is available because the end of the stream has been reached, the value <code>-1</code> is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown. <p> This method tries to read one character from the current substream. If it reaches the end of the stream, it calls the <code>close</code> method of the current substream and begins reading from the next substream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/InputStream.html#read()">read</A></CODE> in class <CODE><A HREF="../../java/io/InputStream.html">InputStream</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="../../java/io/IOException.html">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[] b, int off, int len) throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Reads up to <code>len</code> bytes of data from this input stream into an array of bytes. This method blocks until at least 1 byte of input is available. If the first argument is <code>null</code>, up to <code>len</code> bytes are read and discarded. <p> The <code>read</code> method of <code>SequenceInputStream</code> tries to read the data from the current substream. If it fails to read any characters because the substream has reached the end of the stream, it calls the <code>close</code> method of the current substream and begins reading from the next substream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/InputStream.html#read(byte[], int, int)">read</A></CODE> in class <CODE><A HREF="../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.<DD><CODE>off</CODE> - the start offset of the data.<DD><CODE>len</CODE> - the maximum number of bytes read.<DT><B>Returns:</B><DD>int the number of bytes read.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>() throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Closes this input stream and releases any system resources associated with the stream. A closed <code>SequenceInputStream</code> cannot perform input operations and cannot be reopened. <p> If this stream was created from an enumeration, all remaining elements are requested from the enumeration and closed before the <code>close</code> method returns. of <code>InputStream</code> .<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/InputStream.html#close()">close</A></CODE> in class <CODE><A HREF="../../java/io/InputStream.html">InputStream</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SequenceInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/io/Reader.html"><B>PREV CLASS</B></A> <A HREF="../../java/io/SerializablePermission.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="SequenceInputStream.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -