<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.LineNumberReader
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.LineNumberInputStream.html#_top_">Previous</a>  <a href="java.io.ObjectInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.LineNumberReader
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.Reader.html#_top_">java.io.Reader</a>
           |
           +----<a href="java.io.BufferedReader.html#_top_">java.io.BufferedReader</a>
                   |
                   +----java.io.LineNumberReader
</pre>
<hr>
<dl>
  <dt> public class <b>LineNumberReader</b>
  <dt> extends <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
</dl>
A buffered character-input stream that keeps track of line numbers.  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.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LineNumberReader(java.io.Reader)"><b>LineNumberReader</b></a>(Reader)
  <dd>  Create a new line-numbering reader, using the default input-buffer
 size.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LineNumberReader(java.io.Reader, int)"><b>LineNumberReader</b></a>(Reader, int)
  <dd>  Create a new line-numbering reader, reading characters into a buffer of
 the given size.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getLineNumber()"><b>getLineNumber</b></a>()
  <dd>  Get the current line number.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#mark(int)"><b>mark</b></a>(int)
  <dd>  Mark the present position in the stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read()"><b>read</b></a>()
  <dd>  Read a single character.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(char[], int, int)"><b>read</b></a>(char[], int, int)
  <dd>  Read characters into a portion of an array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readLine()"><b>readLine</b></a>()
  <dd>  Read a line of text.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#reset()"><b>reset</b></a>()
  <dd>  Reset the stream to the most recent mark.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setLineNumber(int)"><b>setLineNumber</b></a>(int)
  <dd>  Set the current line number.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#skip(long)"><b>skip</b></a>(long)
  <dd>  Skip characters.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="LineNumberReader"></a>
<a name="LineNumberReader(java.io.Reader)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>LineNumberReader</b>
<pre>
 public LineNumberReader(<a href="java.io.Reader.html#_top_">Reader</a> in)
</pre>
<dl>
  <dd> Create a new line-numbering reader, using the default input-buffer
 size.
<p>
</dl>
<a name="LineNumberReader(java.io.Reader, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>LineNumberReader</b>
<pre>
 public LineNumberReader(<a href="java.io.Reader.html#_top_">Reader</a> in,
                         int sz)
</pre>
<dl>
  <dd> Create a new line-numbering reader, reading characters into a buffer of
 the given size.
<p>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="setLineNumber(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLineNumber"><b>setLineNumber</b></a>
<pre>
 public void setLineNumber(int lineNumber)
</pre>
<dl>
  <dd> Set the current line number.
<p>
</dl>
<a name="getLineNumber()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getLineNumber"><b>getLineNumber</b></a>
<pre>
 public int getLineNumber()
</pre>
<dl>
  <dd> Get the current line number.
<p>
</dl>
<a name="read()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Read a single character.  Line terminators are compressed into single
 newline ('\n') characters.
<p>
  <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> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.BufferedReader.html#read()">read</a> in class <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
  </dl></dd>
</dl>
<a name="read(char[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(char cbuf[],
                 int off,
                 int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Read characters into a portion of an array.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> cbuf - Destination buffer
    <dd> off - Offset at which to start storing characters
    <dd> len - 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> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.BufferedReader.html#read(char[], int, int)">read</a> in class <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
  </dl></dd>
</dl>
<a name="readLine()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readLine"><b>readLine</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> readLine() throws <a href="java.io.IOException.html#_top_">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.
<p>
  <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> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.BufferedReader.html#readLine()">readLine</a> in class <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
  </dl></dd>
</dl>
<a name="skip(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="skip"><b>skip</b></a>
<pre>
 public long skip(long n) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Skip characters.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> n - The number of characters to skip
    <dt> <b>Returns:</b>
    <dd> The number of characters actually skipped
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.BufferedReader.html#skip(long)">skip</a> in class <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
  </dl></dd>
</dl>
<a name="mark(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="mark"><b>mark</b></a>
<pre>
 public void mark(int readAheadLimit) throws <a href="java.io.IOException.html#_top_">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.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> readAheadLimit - 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> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.BufferedReader.html#mark(int)">mark</a> in class <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
  </dl></dd>
</dl>
<a name="reset()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="reset"><b>reset</b></a>
<pre>
 public void reset() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reset the stream to the most recent mark.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If the stream has not been marked,
                          or if the mark has been invalidated
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.BufferedReader.html#reset()">reset</a> in class <a href="java.io.BufferedReader.html#_top_">BufferedReader</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.LineNumberInputStream.html#_top_">Previous</a>  <a href="java.io.ObjectInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
