|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectjava.io.Reader
java.io.BufferedReader
patterntesting.runtime.io.LineReader
public final class LineReader
If extends BufferedReader but provides you the line number in which
the reader is reading.
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
LineReader(Reader in)
Instantiates a new line reader. |
|
LineReader(Reader in,
int sz)
Instantiates a new line reader. |
|
| Method Summary | |
|---|---|
int |
getLineNumber()
Gets the line number. |
int |
read()
Read. |
int |
read(char[] arg0,
int arg1,
int arg2)
Read. |
String |
readLine()
Read line. |
void |
reset()
Reset. |
long |
skip(long arg0)
Skip. |
void |
skipLines(int n)
Skip lines. |
| Methods inherited from class java.io.BufferedReader |
|---|
close, mark, markSupported, ready |
| Methods inherited from class java.io.Reader |
|---|
read, read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LineReader(Reader in)
in - the in
public LineReader(Reader in,
int sz)
in - the insz - the sz| Method Detail |
|---|
public int getLineNumber()
public int read()
throws IOException
read in class BufferedReaderIOException - Signals that an I/O exception has occurred.BufferedReader.read()
public int read(char[] arg0,
int arg1,
int arg2)
throws IOException
read in class BufferedReaderarg0 - the arg0arg1 - the arg1arg2 - the arg2
IOException - Signals that an I/O exception has occurred.BufferedReader.read(char[], int, int)
public String readLine()
throws IOException
readLine in class BufferedReaderIOException - Signals that an I/O exception has occurred.BufferedReader.readLine()
public void reset()
throws IOException
reset in class BufferedReaderIOException - Signals that an I/O exception has occurred.BufferedReader.reset()
public long skip(long arg0)
throws IOException
skip in class BufferedReaderarg0 - the arg0
IOException - Signals that an I/O exception has occurred.BufferedReader.skip(long)
public void skipLines(int n)
throws IOException
n - the number of lines to skip
IOException - Signals that an I/O exception has occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||