Package org.apache.tika.detect
Class MatroskaDetector
- java.lang.Object
-
- org.apache.tika.detect.MatroskaDetector
-
- All Implemented Interfaces:
Serializable,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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MatroskaDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.tika.mime.MediaTypedetect(InputStream input, org.apache.tika.metadata.Metadata metadata)Detects the media type of the input stream by inspecting EBML headers.
-
-
-
Method Detail
-
detect
public org.apache.tika.mime.MediaType detect(InputStream input, org.apache.tika.metadata.Metadata metadata) throws IOException
Detects the media type of the input stream by inspecting EBML headers.- Specified by:
detectin interfaceorg.apache.tika.detect.Detector- Parameters:
input- the input streammetadata- the metadata to populate- Returns:
- detected MediaType (WEBM, Matroska, or OCTET_STREAM)
- Throws:
IOException- if an I/O error occurs
-
-