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 java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.Readerpublic void mark(int readAheadLimit)
throws java.io.IOException
mark in class java.io.Readerjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.Readerjava.io.IOExceptionCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.