org.apache.jackrabbit.extractor
Class PlainTextExtractor
java.lang.Object
org.apache.jackrabbit.extractor.AbstractTextExtractor
org.apache.jackrabbit.extractor.PlainTextExtractor
- All Implemented Interfaces:
- TextExtractor
public class PlainTextExtractor
- extends AbstractTextExtractor
Text extractor for plain text.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlainTextExtractor
public PlainTextExtractor()
- Creates a new
PlainTextExtractor
instance.
extractText
public Reader extractText(InputStream stream,
String type,
String encoding)
throws IOException
- Wraps the given input stream to an
InputStreamReader
using
the given encoding, or the platform default encoding if the encoding
is not given or is unsupported. Closes the stream and returns an empty
reader if the given encoding is not supported.
- Parameters:
stream
- binary streamtype
- ignoredencoding
- character encoding, optional
- Returns:
- reader for the plain text content
- Throws:
IOException
- if the binary stream can not be closed in case
of an encoding issue
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.