Class OggParser

java.lang.Object
org.apache.tika.parser.AbstractParser
org.apache.tika.parser.ogg.OggParser
All Implemented Interfaces:
Serializable, SelfConfiguring, Parser

public class OggParser extends AbstractParser
General parser for Ogg files where we don't know what the specific kind is. We provide a detector which should help specialise the more common kinds of Ogg files, based on their streams, to their appropriate types. This just handles the rest, as best we can.
See Also:
  • Field Details

    • OGG_GENERAL

      protected static final MediaType OGG_GENERAL
    • OGG_AUDIO

      protected static final MediaType OGG_AUDIO
    • OGG_VIDEO

      protected static final MediaType OGG_VIDEO
    • KATE

      protected static final MediaType KATE
    • DAALA_VIDEO

      protected static final MediaType DAALA_VIDEO
    • DIRAC_VIDEO

      protected static final MediaType DIRAC_VIDEO
    • OGM_VIDEO

      protected static final MediaType OGM_VIDEO
    • OGG_UVS

      protected static final MediaType OGG_UVS
    • OGG_YUV

      protected static final MediaType OGG_YUV
    • OGG_RGB

      protected static final MediaType OGG_RGB
    • OGG_PCM

      protected static final MediaType OGG_PCM
  • Constructor Details

    • OggParser

      public OggParser()
  • Method Details

    • getSupportedTypes

      public Set<MediaType> getSupportedTypes(ParseContext context)
      Description copied from interface: Parser
      Returns the set of media types supported by this parser when used with the given parse context.
      Parameters:
      context - parse context
      Returns:
      immutable set of media types
    • parse

      public void parse(TikaInputStream tis, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, TikaException, SAXException
      Description copied from interface: Parser
      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.

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