Class MatroskaDetector

java.lang.Object
org.apache.tika.detect.mkv.MatroskaDetector
All Implemented Interfaces:
Serializable, org.apache.tika.config.SelfConfiguring, org.apache.tika.detect.Detector

public class MatroskaDetector extends Object implements org.apache.tika.detect.Detector
Detector for Matroska (MKV and WEBM) files based on the EBML header.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.tika.mime.MediaType
    detect(org.apache.tika.io.TikaInputStream tis, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext)
    Detects the media type of the input stream by inspecting EBML headers.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MatroskaDetector

      public MatroskaDetector()
  • Method Details

    • detect

      public org.apache.tika.mime.MediaType detect(org.apache.tika.io.TikaInputStream tis, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext) throws IOException
      Detects the media type of the input stream by inspecting EBML headers.
      Specified by:
      detect in interface org.apache.tika.detect.Detector
      Parameters:
      tis - the input stream
      metadata - the metadata to populate
      Returns:
      detected MediaType (WEBM, Matroska, or OCTET_STREAM)
      Throws:
      IOException - if an I/O error occurs