org.apache.lucene.analysis
Class CharFilter
java.lang.Object
   java.io.Reader
java.io.Reader
       org.apache.lucene.analysis.CharStream
org.apache.lucene.analysis.CharStream
           org.apache.lucene.analysis.CharFilter
org.apache.lucene.analysis.CharFilter
- All Implemented Interfaces: 
- Closeable, Readable
- Direct Known Subclasses: 
- BaseCharFilter, PersianCharFilter
- public abstract class CharFilter 
- extends CharStream
Subclasses of CharFilter can be chained to filter CharStream.
 They can be used as Reader with additional offset
 correction. Tokenizers will automatically use correctOffset(int)
 if a CharFilter/CharStream subclass is used.
 
 
 
| Method Summary | 
|  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()
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
input
protected CharStream input
CharFilter
protected CharFilter(CharStream in)
correct
protected int correct(int currentOff)
- Subclass may want to override to correct the current offset.
 
- 
- Parameters:
- currentOff- current offset
- Returns:
- corrected offset
 
correctOffset
public final int correctOffset(int currentOff)
- Chains the corrected offset through the input
 CharFilter.
 
- 
- Specified by:
- correctOffsetin class- CharStream
 
- 
- Parameters:
- currentOff- offset as seen in the output
- Returns:
- corrected offset based on the input
 
close
public void close()
           throws IOException
- 
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- Reader
 
- 
- Throws:
- IOException
 
read
public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
- 
- Specified by:
- readin class- Reader
 
- 
- Throws:
- IOException
 
markSupported
public boolean markSupported()
- 
- Overrides:
- markSupportedin class- Reader
 
- 
 
mark
public void mark(int readAheadLimit)
          throws IOException
- 
- Overrides:
- markin class- Reader
 
- 
- Throws:
- IOException
 
reset
public void reset()
           throws IOException
- 
- Overrides:
- resetin class- Reader
 
- 
- Throws:
- IOException
 
Copyright © 2000-2011 Apache Software Foundation.  All Rights Reserved.