|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.japaki.text.ParseReader
public abstract class ParseReader
A ParseReader
is used for parsing an input stream.
It stores all necessary information about the input stream and the
parsing status.
Constructor Summary | |
---|---|
ParseReader()
|
Method Summary | |
---|---|
abstract void |
checkForException(String errorMessage)
Creates a parsing exception with the specified error message. |
abstract boolean |
eof()
Checks if the input stream is at its end. |
abstract ParsePosition |
getPosition()
Returns the current parse position. |
abstract String |
getSource()
Returns the current line of the input stream. |
abstract void |
newLine()
Forwards to the next line in the input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.japaki.io.RestorableIO |
---|
copyFrom, deepCopy |
Methods inherited from interface java.io.Closeable |
---|
close |
Methods inherited from interface net.sf.japaki.text.PathTracker |
---|
getPath |
Constructor Detail |
---|
public ParseReader()
Method Detail |
---|
public abstract void newLine() throws IOException, ParseException
IOException
- if an I/O error occurs
ParseException
- if end of current line was not reachedpublic abstract boolean eof()
true
if end of file is reachedpublic abstract String getSource()
null
if the end of the stream has been reached.BufferedReader.readLine()
public abstract ParsePosition getPosition()
public abstract void checkForException(String errorMessage) throws ParsingException
errorMessage
- message set in the exception
ParsingException
- if the error index of the parse position is set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |