Package org.apache.tika.parser.txt
Class TXTParser
- java.lang.Object
-
- org.apache.tika.parser.AbstractParser
-
- org.apache.tika.parser.AbstractEncodingDetectorParser
-
- org.apache.tika.parser.txt.TXTParser
-
- All Implemented Interfaces:
Serializable,org.apache.tika.parser.Parser
public class TXTParser extends org.apache.tika.parser.AbstractEncodingDetectorParserPlain text parser. The text encoding of the document stream is automatically detected based on the byte patterns found at the beginning of the stream and the given document metadata, most notably thecharsetparameter of aHttpHeaders.CONTENT_TYPEvalue. This parser sets the following output metadata entries:HttpHeaders.CONTENT_TYPEtext/plain; charset=...
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<org.apache.tika.mime.MediaType>getSupportedTypes(org.apache.tika.parser.ParseContext context)voidparse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context)
-
-
-
Method Detail
-
getSupportedTypes
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
-
parse
public void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
-