|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.parse.LineByLine
public abstract class LineByLine
This abstract Parser does not define the next()
method, but it does define a constructor that opens the specified file and
a readLine() method that fetches the next line of text from
that file, taking care of exception handling.
| Field Summary | |
|---|---|
protected java.lang.String |
fileName
The name of the file to parse. |
protected java.io.BufferedReader |
in
Reader for file currently being parsed. |
| Constructor Summary | |
|---|---|
protected |
LineByLine()
Leaves the member variables uninitialized. |
|
LineByLine(java.lang.String file)
Creates the parser. |
| Method Summary | |
|---|---|
protected java.lang.String |
readLine()
Reads a line from the current buffer and returns it. |
void |
reset()
Sets this parser back to the beginning of the raw data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface LBJ2.parse.Parser |
|---|
next |
| Field Detail |
|---|
protected java.io.BufferedReader in
protected java.lang.String fileName
| Constructor Detail |
|---|
protected LineByLine()
public LineByLine(java.lang.String file)
file - The name of the file to parse.| Method Detail |
|---|
protected java.lang.String readLine()
null will be returned by this method thereafter. Returned
strings do not contain line termination characters.
null
if not more lines remain.public void reset()
reset in interface Parser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||