public abstract class CharFilter extends CharStream
Reader with additional offset
correction. Tokenizers 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 CharStreamcurrentOff - offset as seen in the outputpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Readerpublic void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOExceptionpublic void reset()
throws IOException
reset in class ReaderIOExceptionCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.