⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bufferedreader.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="BufferedReader(java.io.Reader, int)"><!-- --></A><H3>BufferedReader</H3><PRE>public <B>BufferedReader</B>(<A HREF="../../java/io/Reader.html">Reader</A>&nbsp;in,                      int&nbsp;sz)</PRE><DL><DD>Create a buffering character-input stream that uses an input buffer of the specified size.<DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - A Reader<DD><CODE>sz</CODE> - Input-buffer size<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - If sz is <= 0</DL></DD></DL><HR><A NAME="BufferedReader(java.io.Reader)"><!-- --></A><H3>BufferedReader</H3><PRE>public <B>BufferedReader</B>(<A HREF="../../java/io/Reader.html">Reader</A>&nbsp;in)</PRE><DL><DD>Create a buffering character-input stream that uses a default-sized input buffer.<DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - A Reader</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="read()"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>()         throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Read a single character.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#read()">read</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</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><HR><A NAME="read(char[], int, int)"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(char[]&nbsp;cbuf,                int&nbsp;off,                int&nbsp;len)         throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Read characters into a portion of an array. <p> This method implements the general contract of the corresponding <code><A HREF="../../java/io/Reader.html#read(char[], int, int)"><CODE>read</CODE></A></code> method of the <code><A HREF="../../java/io/Reader.html"><CODE>Reader</CODE></A></code> class.  As an additional convenience, it attempts to read as many characters as possible by repeatedly invoking the <code>read</code> method of the underlying stream.  This iterated <code>read</code> continues until one of the following conditions becomes true: <ul>   <li> The specified number of characters have been read,   <li> The <code>read</code> method of the underlying stream returns   <code>-1</code>, indicating end-of-file, or   <li> The <code>ready</code> method of the underlying stream   returns <code>false</code>, indicating that further input requests   would block. </ul> If the first <code>read</code> on the underlying stream returns <code>-1</code> to indicate end-of-file then this method returns <code>-1</code>.  Otherwise this method returns the number of characters actually read. <p> Subclasses of this class are encouraged, but not required, to attempt to read as many characters as possible in the same fashion. <p> Ordinarily this method takes characters from this stream's character buffer, filling it from the underlying stream as necessary.  If, however, the buffer is empty, the mark is not valid, and the requested length is at least as large as the buffer, then this method will read characters directly from the underlying stream into the given array. Thus redundant <code>BufferedReader</code>s will not copy data unnecessarily.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#read(char[], int, int)">read</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>cbuf</CODE> - Destination buffer<DD><CODE>off</CODE> - Offset at which to start storing characters<DD><CODE>len</CODE> - Maximum number of characters to read<DT><B>Returns:</B><DD>The number of characters read, or -1 if the end of the             stream has been 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="readLine()"><!-- --></A><H3>readLine</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>readLine</B>()                throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Read a line of text.  A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.<DD><DL><DT><B>Returns:</B><DD>A String containing the contents of the line, not including             any line-termination characters, or null if the end of the             stream has been 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="skip(long)"><!-- --></A><H3>skip</H3><PRE>public long <B>skip</B>(long&nbsp;n)          throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Skip characters.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#skip(long)">skip</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - The number of characters to skip<DT><B>Returns:</B><DD>The number of characters actually skipped<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - If <code>n</code> is negative.<DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - If an I/O error occurs</DL></DD></DL><HR><A NAME="ready()"><!-- --></A><H3>ready</H3><PRE>public boolean <B>ready</B>()              throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Tell whether this stream is ready to be read.  A buffered character stream is ready if the buffer is not empty, or if the underlying character stream is ready.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#ready()">ready</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</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><HR><A NAME="markSupported()"><!-- --></A><H3>markSupported</H3><PRE>public boolean <B>markSupported</B>()</PRE><DL><DD>Tell whether this stream supports the mark() operation, which it does.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#markSupported()">markSupported</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</A></CODE></DL></DD><DD>Following copied from class: <CODE>java.io.Reader</CODE></DD><DD><DL><DT><B>Returns:</B><DD>true if and only if this stream supports the mark operation.</DL></DD></DL><HR><A NAME="mark(int)"><!-- --></A><H3>mark</H3><PRE>public void <B>mark</B>(int&nbsp;readAheadLimit)          throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Mark the present position in the stream.  Subsequent calls to reset() will attempt to reposition the stream to this point.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#mark(int)">mark</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>readAheadLimit</CODE> - Limit on the number of characters that may be                         read while still preserving the mark.  After                         reading this many characters, attempting to                         reset the stream may fail.  A limit value larger                         than the size of the input buffer will cause a                         new buffer to be allocated whose size is no                         smaller than limit.  Therefore large values                         should be used with care.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - If readAheadLimit is < 0<DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - If an I/O error occurs</DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()           throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Reset the stream to the most recent mark.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#reset()">reset</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - If the stream has never been marked,                          or if the mark has been invalidated</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>Close the stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Reader.html#close()">close</A></CODE> in class <CODE><A HREF="../../java/io/Reader.html">Reader</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BufferedReader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/io/BufferedOutputStream.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/io/BufferedWriter.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>  &nbsp;&nbsp;<A HREF="BufferedReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.io.Reader">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -