public class PlainTextExtractor extends AbstractTextExtractor
Constructor and Description |
---|
PlainTextExtractor()
Creates a new
PlainTextExtractor instance. |
Modifier and Type | Method and Description |
---|---|
String |
extractText(InputStream stream,
String type,
String encoding)
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. |
getContentTypes
public PlainTextExtractor()
PlainTextExtractor
instance.public String extractText(InputStream stream, String type, String encoding) throws IOException
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.stream
- binary streamtype
- ignoredencoding
- character encoding, optionalIOException
- if the binary stream can not be closed in case
of an encoding issueCopyright © 2017 Open Knowledge Management System S.L.. All rights reserved.