public abstract class TokenFilter extends TokenStream
This is an abstract class; subclasses must override TokenStream.incrementToken().
TokenStreamAttributeSource.AttributeFactory, AttributeSource.State| Modifier and Type | Field and Description |
|---|---|
protected TokenStream |
input
The source of tokens for this filter.
|
| Modifier | Constructor and Description |
|---|---|
protected |
TokenFilter(TokenStream input)
Construct a token stream filtering the given input.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the input TokenStream.
|
void |
end()
Performs end-of-stream operations, if any, and calls then
end() on the
input TokenStream.
NOTE: Be sure to call super.end() first when overriding this method. |
void |
reset()
Reset the filter as well as the input TokenStream.
|
incrementTokenaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toStringprotected final TokenStream input
protected TokenFilter(TokenStream input)
public void end()
throws java.io.IOException
end() on the
input TokenStream.
NOTE: Be sure to call super.end() first when overriding this method.end in class TokenStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class TokenStreamjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class TokenStreamjava.io.IOExceptionCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.