Package org.apache.tika.detect
Class MatroskaDetector
java.lang.Object
org.apache.tika.detect.MatroskaDetector
- All Implemented Interfaces:
Serializable,SelfConfiguring,Detector
Detector for Matroska (MKV and WEBM) files based on the EBML header.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetect(TikaInputStream tis, Metadata metadata, ParseContext parseContext) Detects the media type of the input stream by inspecting EBML headers.
-
Constructor Details
-
MatroskaDetector
public MatroskaDetector()
-
-
Method Details
-
detect
public MediaType detect(TikaInputStream tis, Metadata metadata, ParseContext parseContext) throws IOException Detects the media type of the input stream by inspecting EBML headers.- Specified by:
detectin interfaceDetector- Parameters:
tis- the input streammetadata- the metadata to populateparseContext- the parse context- Returns:
- detected MediaType (WEBM, Matroska, or OCTET_STREAM)
- Throws:
IOException- if an I/O error occurs
-