Class HTMLStripCharFilter
- java.lang.Object
-
- java.io.Reader
-
- org.apache.lucene.analysis.CharStream
-
- org.apache.lucene.analysis.CharFilter
-
- org.apache.lucene.analysis.BaseCharFilter
-
- org.apache.lucene.analysis.charfilter.HTMLStripCharFilter
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public final class HTMLStripCharFilter extends BaseCharFilter
A CharFilter that wraps another Reader and attempts to strip out HTML constructs.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
-
-
Constructor Summary
Constructors Constructor Description HTMLStripCharFilter(CharStream source)HTMLStripCharFilter(CharStream source, Set<String> escapedTags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()intread(char[] cbuf, int off, int len)-
Methods inherited from class org.apache.lucene.analysis.BaseCharFilter
addOffCorrectMap, correct, getLastCumulativeDiff
-
Methods inherited from class org.apache.lucene.analysis.CharFilter
correctOffset, mark, markSupported, reset
-
Methods inherited from class java.io.Reader
nullReader, read, read, ready, skip, transferTo
-
-
-
-
Constructor Detail
-
HTMLStripCharFilter
public HTMLStripCharFilter(CharStream source)
- Parameters:
source-
-
HTMLStripCharFilter
public HTMLStripCharFilter(CharStream source, Set<String> escapedTags)
- Parameters:
source-escapedTags- Tags in this set (both start and end tags) will not be filtered out.
-
-
Method Detail
-
read
public int read() throws IOException- Overrides:
readin classReader- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Overrides:
readin classCharFilter- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classCharFilter- Throws:
IOException
-
-