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

📄 linenumberreader.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><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="LineNumberReader(java.io.Reader)"><!-- --></A><H3>LineNumberReader</H3><PRE>public <B>LineNumberReader</B>(<A HREF="../../java/io/Reader.html">Reader</A>&nbsp;in)</PRE><DL><DD>Create a new line-numbering reader, using the default input-buffer size.<DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - a Reader object to provide the underlying stream.</DL></DD></DL><HR><A NAME="LineNumberReader(java.io.Reader, int)"><!-- --></A><H3>LineNumberReader</H3><PRE>public <B>LineNumberReader</B>(<A HREF="../../java/io/Reader.html">Reader</A>&nbsp;in,                        int&nbsp;sz)</PRE><DL><DD>Create a new line-numbering reader, reading characters into a buffer of the given size.<DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - a Reader object to provide the underlying stream.<DD><CODE>sz</CODE> - an int specifying the size of the buffer.</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="setLineNumber(int)"><!-- --></A><H3>setLineNumber</H3><PRE>public void <B>setLineNumber</B>(int&nbsp;lineNumber)</PRE><DL><DD>Set the current line number.<DD><DL><DT><B>Parameters:</B><DD><CODE>lineNumber</CODE> - an int specifying the line number.<DT><B>See Also: </B><DD><A HREF="../../java/io/LineNumberReader.html#getLineNumber()"><CODE>getLineNumber()</CODE></A></DL></DD></DL><HR><A NAME="getLineNumber()"><!-- --></A><H3>getLineNumber</H3><PRE>public int <B>getLineNumber</B>()</PRE><DL><DD>Get the current line number.<DD><DL><DT><B>Returns:</B><DD>The current line number.<DT><B>See Also: </B><DD><A HREF="../../java/io/LineNumberReader.html#setLineNumber(int)"><CODE>setLineNumber(int)</CODE></A></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>Read a single character.  Line terminators are compressed into single newline ('\n') characters.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/BufferedReader.html#read()">read</A></CODE> in class <CODE><A HREF="../../java/io/BufferedReader.html">BufferedReader</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The character 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="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.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/BufferedReader.html#read(char[], int, int)">read</A></CODE> in class <CODE><A HREF="../../java/io/BufferedReader.html">BufferedReader</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 bytes read, or -1 if the end of the stream has             already 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>Overrides:</B><DD><CODE><A HREF="../../java/io/BufferedReader.html#readLine()">readLine</A></CODE> in class <CODE><A HREF="../../java/io/BufferedReader.html">BufferedReader</A></CODE></DL></DD><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/BufferedReader.html#skip(long)">skip</A></CODE> in class <CODE><A HREF="../../java/io/BufferedReader.html">BufferedReader</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/io/IOException.html">IOException</A></CODE> - If an I/O error occurs</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, and will also reset the line number appropriately.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/BufferedReader.html#mark(int)">mark</A></CODE> in class <CODE><A HREF="../../java/io/BufferedReader.html">BufferedReader</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.<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="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/BufferedReader.html#reset()">reset</A></CODE> in class <CODE><A HREF="../../java/io/BufferedReader.html">BufferedReader</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 not been marked,                          or if the mark has been invalidated</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/LineNumberReader.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/LineNumberInputStream.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/io/ObjectInputStream.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="LineNumberReader.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 + -