Package org.apache.lucene.analysis
Class CharStream
- java.lang.Object
-
- java.io.Reader
-
- org.apache.lucene.analysis.CharStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
- Direct Known Subclasses:
CharFilter
,CharReader
,MockCharFilter
public abstract class CharStream extends Reader
CharStream addscorrectOffset(int)
functionality overReader
. All Tokenizers accept a CharStream instead ofReader
as input, which enables arbitrary character based filtering before tokenization. ThecorrectOffset(int)
method fixed offsets to account for removal or insertion of characters, so that the offsets reported in the tokens match the character offsets of the original Reader.
-
-
Constructor Summary
Constructors Constructor Description CharStream()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract int
correctOffset(int currentOff)
Called by CharFilter(s) and Tokenizer to correct token offset.-
Methods inherited from class java.io.Reader
close, mark, markSupported, nullReader, read, read, read, read, ready, reset, skip, transferTo
-
-