Package org.apache.tika.detect
Class AutoDetectReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- org.apache.tika.detect.AutoDetectReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
public class AutoDetectReader extends BufferedReader
An input stream reader that automatically detects the character encoding to be used for converting bytes to characters.- Since:
- Apache Tika 1.2
-
-
Constructor Summary
Constructors Constructor Description AutoDetectReader(InputStream stream)
AutoDetectReader(InputStream stream, Metadata metadata)
AutoDetectReader(InputStream stream, Metadata metadata, ServiceLoader loader)
AutoDetectReader(InputStream stream, Metadata metadata, EncodingDetector encodingDetector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSource
asInputSource()
Charset
getCharset()
-
Methods inherited from class java.io.BufferedReader
close, lines, mark, markSupported, read, read, readLine, ready, reset, skip
-
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
-
-
-
Constructor Detail
-
AutoDetectReader
public AutoDetectReader(InputStream stream, Metadata metadata, EncodingDetector encodingDetector) throws IOException, TikaException
- Throws:
IOException
TikaException
-
AutoDetectReader
public AutoDetectReader(InputStream stream, Metadata metadata, ServiceLoader loader) throws IOException, TikaException
- Throws:
IOException
TikaException
-
AutoDetectReader
public AutoDetectReader(InputStream stream, Metadata metadata) throws IOException, TikaException
- Throws:
IOException
TikaException
-
AutoDetectReader
public AutoDetectReader(InputStream stream) throws IOException, TikaException
- Throws:
IOException
TikaException
-
-
Method Detail
-
getCharset
public Charset getCharset()
-
asInputSource
public InputSource asInputSource()
-
-