public abstract class CharFilter extends CharStream
Reader
with additional offset
correction. Tokenizer
s will automatically use correctOffset(int)
if a CharFilter/CharStream subclass is used.Modifier and Type | Field and Description |
---|---|
protected CharStream |
input |
Modifier | Constructor and Description |
---|---|
protected |
CharFilter(CharStream in) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected int |
correct(int currentOff)
Subclass may want to override to correct the current offset.
|
int |
correctOffset(int currentOff)
Chains the corrected offset through the input
CharFilter.
|
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read(char[] cbuf,
int off,
int len) |
void |
reset() |
protected CharStream input
protected CharFilter(CharStream in)
protected int correct(int currentOff)
currentOff
- current offsetpublic final int correctOffset(int currentOff)
correctOffset
in class CharStream
currentOff
- offset as seen in the outputpublic void close() throws IOException
close
in interface Closeable
close
in class Reader
IOException
public int read(char[] cbuf, int off, int len) throws IOException
read
in class Reader
IOException
public boolean markSupported()
markSupported
in class Reader
public void mark(int readAheadLimit) throws IOException
mark
in class Reader
IOException
public void reset() throws IOException
reset
in class Reader
IOException