com.go.tea.io
Class PushbackPositionReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--com.go.trove.io.PositionReader
|
+--com.go.tea.io.PositionReader
|
+--com.go.tea.io.PushbackPositionReader
- Direct Known Subclasses:
- SourceReader
Deprecated. Moved to com.go.trove.io package.
- public class PushbackPositionReader
- extends PositionReader
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.
- Version:
- 11 , 12/11/00
- Author:
- Brian S O'Neill
- See Also:
java.io.PushbackReader
| Fields inherited from class java.io.FilterReader |
in |
| Fields inherited from class java.io.Reader |
lock |
|
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 java.io.FilterReader |
mark, markSupported, ready, reset, skip |
| Methods inherited from class java.io.Reader |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PushbackPositionReader
public PushbackPositionReader(java.io.Reader reader)
- Deprecated.
PushbackPositionReader
public PushbackPositionReader(java.io.Reader reader,
int pushback)
- Deprecated.
getStartPosition
public int getStartPosition()
- Deprecated.
- Returns:
- the start position of the last read character.
read
public int read()
throws java.io.IOException
- Deprecated.
- Overrides:
read in class PositionReader
peek
public int peek()
throws java.io.IOException
- Deprecated.
unread
public void unread(int amount)
throws java.io.IOException
- Deprecated.
- Unread the last several characters read.
Unlike PushbackReader, unread does not allow arbitrary characters to
to be unread. Rather, it functions like an undo operation.
- Parameters:
amount - Amount of characters to unread.- See Also:
java.io.PushbackReader#unread(int)
unread
public void unread()
throws java.io.IOException
- Deprecated.
- Unread the last character read.
Unlike PushbackReader, unread does not allow arbitrary characters to
to be unread. Rather, it functions like an undo operation.
- See Also:
java.io.PushbackReader#unread(int)
unreadHook
protected void unreadHook(int c)
- Deprecated.
- A hook call from the unread method(s). Every unread character is
passed to this method.