|
ref_send API 2.17 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.waterken.syntax.SourceReader
public final class SourceReader
A text reader that keeps track of the current line and column number, as well as the most recent character read.
| Field Summary | |
|---|---|
static java.lang.String |
newLine
all Unicode line terminators |
| Constructor Summary | |
|---|---|
SourceReader(java.io.Reader in)
Constructs an instance. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the text stream. |
int |
getColumn()
Gets the column number of the head character. |
int |
getHead()
Gets the last read character, or -1 for EOF. |
int |
getLine()
Gets the line number of the head character. |
int |
read()
Gets the next character in the stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String newLine
| Constructor Detail |
|---|
public SourceReader(java.io.Reader in)
in - underlying character stream| Method Detail |
|---|
public int getLine()
public int getColumn()
public int getHead()
read character, or -1 for EOF.
public int read()
throws java.io.EOFException,
java.io.IOException
java.io.EOFException - attempt to read past EOF
java.io.IOException - any I/O problem
public void close()
throws java.io.IOException
java.io.IOException - any I/O problem
|
ref_send API 2.17 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.