Class TXTParser

  • All Implemented Interfaces:
    Serializable, org.apache.tika.parser.Parser

    public class TXTParser
    extends org.apache.tika.parser.AbstractEncodingDetectorParser
    Plain 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 the charset parameter of a HttpHeaders.CONTENT_TYPE value.

    This parser sets the following output metadata entries:

    HttpHeaders.CONTENT_TYPE
    text/plain; charset=...
    See Also:
    Serialized Form
    • Constructor Detail

      • TXTParser

        public TXTParser()
      • TXTParser

        public TXTParser​(org.apache.tika.detect.EncodingDetector encodingDetector)
    • Method Detail

      • getSupportedTypes

        public Set<org.apache.tika.mime.MediaType> getSupportedTypes​(org.apache.tika.parser.ParseContext context)