Class MappingCharFilter
- java.lang.Object
-
- java.io.Reader
-
- org.apache.lucene.analysis.CharFilter
-
- org.apache.lucene.analysis.charfilter.BaseCharFilter
-
- org.apache.lucene.analysis.charfilter.MappingCharFilter
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public class MappingCharFilter extends BaseCharFilter
SimplisticCharFilterthat applies the mappings contained in aNormalizeCharMapto the character stream, and correcting the resulting changes to the offsets. Matching is greedy (longest pattern matching at a given point wins). Replacement is allowed to be the empty string.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
-
-
Constructor Summary
Constructors Constructor Description MappingCharFilter(NormalizeCharMap normMap, Reader in)Default constructor that takes aReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread()intread(char[] cbuf, int off, int len)voidreset()-
Methods inherited from class org.apache.lucene.analysis.charfilter.BaseCharFilter
addOffCorrectMap, correct, getLastCumulativeDiff
-
Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correctOffset
-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, skip, transferTo
-
-
-
-
Constructor Detail
-
MappingCharFilter
public MappingCharFilter(NormalizeCharMap normMap, Reader in)
Default constructor that takes aReader.
-
-
Method Detail
-
reset
public void reset() throws IOException- Overrides:
resetin classReader- Throws:
IOException
-
read
public int read() throws IOException- Overrides:
readin classReader- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
-