org.apache.lucene.analysis.charfilter
Class HTMLStripCharFilter

java.lang.Object
  extended by java.io.Reader
      extended by org.apache.lucene.analysis.CharStream
          extended by org.apache.lucene.analysis.CharFilter
              extended by org.apache.lucene.analysis.BaseCharFilter
                  extended by org.apache.lucene.analysis.charfilter.HTMLStripCharFilter
All Implemented Interfaces:
Closeable, Readable

public final class HTMLStripCharFilter
extends org.apache.lucene.analysis.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
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
HTMLStripCharFilter(org.apache.lucene.analysis.CharStream source)
           
HTMLStripCharFilter(org.apache.lucene.analysis.CharStream source, Set<String> escapedTags)
           
 
Method Summary
 void close()
           
 int read()
           
 int read(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
read, read, ready, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLStripCharFilter

public HTMLStripCharFilter(org.apache.lucene.analysis.CharStream source)
Parameters:
source -

HTMLStripCharFilter

public HTMLStripCharFilter(org.apache.lucene.analysis.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:
read in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Overrides:
read in class org.apache.lucene.analysis.CharFilter
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class org.apache.lucene.analysis.CharFilter
Throws:
IOException


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.