Interface Parser

All Superinterfaces:
All Known Implementing Classes:
AbstractDBParser, AbstractDWGParser, AbstractEncodingDetectorParser, AbstractExternalProcessParser, AbstractImageParser, AbstractMultipleParser, AbstractOfficeParser, AbstractParser, AbstractXML2003Parser, ActiveMimeParser, AdobeFontMetricParser, AgeRecogniser, AmazonTranscribe, AppleSingleFileParser, AudioParser, AutoDetectParser, BPGParser, ChmParser, ClassParser, CompositeExternalParser, CompositeParser, CompressorParser, CryptoParser, CTAKESParser, DBFParser, DcXMLParser, DefaultParser, DelegatingParser, DGN8Parser, DIFParser, DigestingParser, DirListParser, DWGParser, DWGReadParser, EMFParser, EmptyParser, EncryptedPrescriptionParser, EnviHeaderParser, EpubContentParser, EpubParser, ErrorParser, ExecutableParser, ExternalParser, ExternalParser, FallbackParser, FeedParser, FictionBookParser, FlatOpenDocumentParser, FLVParser, ForkParser, GDALParser, GeographicInformationParser, GeoParser, GribParser, HDFParser, HeifParser, HtmlParser, HttpParser, HwpV5Parser, ICNSParser, IDMLParser, ImageParser, IptcAnpaParser, ISArchiveParser, IWork13PackageParser, IWork18PackageParser, IWorkPackageParser, JackcessParser, JournalParser, JpegParser, JXLParser, LanguageDetectingParser, Latin1StringsParser, MatParser, MboxParser, MidiParser, MIFParser, Mp3Parser, MP4Parser, MSOwnerFileParser, NamedEntityParser, NetCDFParser, NetworkParser, ObjectRecognitionParser, OfficeParser, OldExcelParser, OneNoteParser, OOXMLParser, OpenDocumentContentParser, OpenDocumentMetaParser, OpenDocumentParser, OPFParser, OutlookPSTParser, PackageParser, ParserDecorator, ParserPostProcessor, PDFParser, PickBestTextEncodingParser, Pkcs7Parser, PListParser, PooledTimeSeriesParser, PrescriptionParser, PRTParser, PSDParser, QuattroProParser, RarParser, RecursiveParserWrapper, RegexCaptureParser, RFC822Parser, RTFParser, SAS7BDATParser, SentimentAnalysisParser, SourceCodeParser, SpreadsheetMLParser, SQLite3Parser, StatefulParser, StringsParser, SupplementingParser, TensorflowImageRecParser, TesseractOCRParser, TextAndAttributeXMLParser, TextAndCSVParser, TiffParser, TMXParser, TNEFParser, TrueTypeParser, TSDParser, TXTParser, UnrarParser, WACZParser, WARCParser, WebPParser, WMFParser, Word2006MLParser, WordMLParser, WordPerfectParser, XLIFF12Parser, XLZParser, XMLParser, XMLProfiler

public interface Parser extends Serializable
Tika parser interface.
  • Method Details

    • getSupportedTypes

      Set<MediaType> getSupportedTypes(ParseContext context)
      Returns the set of media types supported by this parser when used with the given parse context.
      context - parse context
      immutable set of media types
      Apache Tika 0.7
    • parse

      void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException
      Parses a document stream into a sequence of XHTML SAX events. Fills in related document metadata in the given metadata object.

      The given document stream is consumed but not closed by this method. The responsibility to close the stream remains on the caller.

      Information about the parsing context can be passed in the context parameter. See the parser implementations for the kinds of context information they expect.

      stream - the document stream (input)
      handler - handler for the XHTML SAX events (output)
      metadata - document metadata (input and output)
      context - parse context
      IOException - if the document stream could not be read
      SAXException - if the SAX events could not be processed
      TikaException - if the document could not be parsed
      Apache Tika 0.5