Class MatroskaDetector

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

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

    • MatroskaDetector

      public MatroskaDetector()
  • Method Details

    • detect

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