class CharIndexedReader extends Object implements CharIndexed
Modifier and Type | Field and Description |
---|---|
private BufferedReader |
br |
private static int |
BUFFER_INCREMENT |
private int |
bufsize |
private char |
cached |
private int |
end |
private int |
index |
private char[] |
lookBehind |
private static int |
UNKNOWN |
OUT_OF_BOUNDS
Constructor and Description |
---|
CharIndexedReader(Reader reader,
int index) |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index)
Returns the character at the given offset past the current cursor
position in the input.
|
boolean |
isValid()
Returns true if the most recent move() operation placed the cursor
position at a valid position in the input.
|
boolean |
move(int index)
Shifts the input buffer by a given number of positions.
|
private boolean |
next() |
private static final int BUFFER_INCREMENT
private static final int UNKNOWN
private final BufferedReader br
private int index
private int bufsize
private int end
private char cached
private char[] lookBehind
CharIndexedReader(Reader reader, int index)
private boolean next()
public char charAt(int index)
CharIndexed
charAt
in interface CharIndexed
index
- the offset position in the character field to examinepublic boolean move(int index)
CharIndexed
move
in interface CharIndexed
public boolean isValid()
CharIndexed
isValid
in interface CharIndexed
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses