public class TextFilterExtractor extends Object implements org.apache.jackrabbit.extractor.TextExtractor
TextFilter
interface. This class
implements the TextExtractor
interface through calls to an
underlying TextFilter
instance.Constructor and Description |
---|
TextFilterExtractor(String[] types,
TextFilter filter)
Creates a text extractor adapter that supports the given content
types using the given text filter.
|
TextFilterExtractor(String type,
TextFilter filter)
Creates a text extractor adapter that supports the given content
type using the given text filter.
|
Modifier and Type | Method and Description |
---|---|
Reader |
extractText(InputStream stream,
String type,
String encoding)
Extracts the text content of the given binary stream by calling the
underlying
TextFilter instance. |
String[] |
getContentTypes()
Returns the supported content types.
|
public TextFilterExtractor(String[] types, TextFilter filter)
types
- supported content typesfilter
- text filter to be adaptedpublic TextFilterExtractor(String type, TextFilter filter)
type
- supported content typefilter
- text filter to be adaptedpublic String[] getContentTypes()
getContentTypes
in interface org.apache.jackrabbit.extractor.TextExtractor
public Reader extractText(InputStream stream, String type, String encoding) throws IOException
TextFilter
instance. A dummy PropertyState
instance is created to comply with the
TextFilter.doFilter(PropertyState, String)
method signature.extractText
in interface org.apache.jackrabbit.extractor.TextExtractor
stream
- binary streamtype
- content typeencoding
- character encoding, or null
IOException
- if the adapted call failsCopyright © 2016. All rights reserved.