org.apache.lucene.analysis
Class MockCharFilter
java.lang.Object
java.io.Reader
org.apache.lucene.analysis.CharStream
org.apache.lucene.analysis.MockCharFilter
- All Implemented Interfaces:
- Closeable, Readable
public class MockCharFilter
- extends org.apache.lucene.analysis.CharStream
the purpose of this charfilter is to send offsets out of bounds
if the analyzer doesn't use correctOffset or does incorrect offset math.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockCharFilter
public MockCharFilter(Reader in,
int remainder)
MockCharFilter
public MockCharFilter(Reader in)
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Reader
- Throws:
IOException
read
public int read()
throws IOException
- Overrides:
read
in class Reader
- Throws:
IOException
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Specified by:
read
in class Reader
- Throws:
IOException
correctOffset
public int correctOffset(int currentOff)
- Specified by:
correctOffset
in class org.apache.lucene.analysis.CharStream
addOffCorrectMap
protected void addOffCorrectMap(int off,
int cumulativeDiff)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.