org.apache.lucene.analysis
public abstract class CharFilter extends CharStream
Reader
with additional offset
correction. Tokenizer
s 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 CharStream
currentOff
- offset as seen in the outputpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.Reader
public void mark(int readAheadLimit) throws java.io.IOException
mark
in class java.io.Reader
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.Reader
java.io.IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.