|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
java.io.FilterReader
org.teatrove.trove.io.PositionReader
org.teatrove.tea.io.PositionReader
org.teatrove.tea.io.PushbackPositionReader
public class PushbackPositionReader
The PushbackPositionReader is a kind of pushback reader that tracks the postion in the stream of the next character to be read. The java.io.PushbackReader allows arbitrary characters to be pushed back. Since this Reader may need to keep track of how many characters were scanned from the underlying Reader to actually produce a character, the unread operation cannot accept any arbitrary character.
PushbackReader| Field Summary |
|---|
| Fields inherited from class org.teatrove.trove.io.PositionReader |
|---|
mPosition, mPosReader |
| Fields inherited from class java.io.FilterReader |
|---|
in |
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
PushbackPositionReader(Reader reader)
Deprecated. |
|
PushbackPositionReader(Reader reader,
int pushback)
Deprecated. |
|
| Method Summary | |
|---|---|
int |
getStartPosition()
Deprecated. |
int |
peek()
Deprecated. |
int |
read()
Deprecated. |
void |
unread()
Deprecated. Unread the last character read. |
void |
unread(int amount)
Deprecated. Unread the last several characters read. |
protected void |
unreadHook(int c)
Deprecated. A hook call from the unread method(s). |
| Methods inherited from class org.teatrove.trove.io.PositionReader |
|---|
close, getNextPosition, read |
| Methods inherited from class java.io.FilterReader |
|---|
mark, markSupported, ready, reset, skip |
| 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 PushbackPositionReader(Reader reader)
public PushbackPositionReader(Reader reader,
int pushback)
| Method Detail |
|---|
public int getStartPosition()
public int read()
throws IOException
read in class PositionReaderIOException
public int peek()
throws IOException
IOException
public void unread(int amount)
throws IOException
Unlike PushbackReader, unread does not allow arbitrary characters to to be unread. Rather, it functions like an undo operation.
amount - Amount of characters to unread.
IOExceptionPushbackReader.unread(int)
public void unread()
throws IOException
Unlike PushbackReader, unread does not allow arbitrary characters to to be unread. Rather, it functions like an undo operation.
IOExceptionPushbackReader.unread(int)protected void unreadHook(int c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||