Class TypeDetector
java.lang.Object
org.apache.tika.detect.TypeDetector
- All Implemented Interfaces:
Serializable, Detector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetect(InputStream input, Metadata metadata) Detects the content type of an input document based on a type hint given in the input metadata.
-
Constructor Details
-
TypeDetector
public TypeDetector()
-
-
Method Details
-
detect
Detects the content type of an input document based on a type hint given in the input metadata. The CONTENT_TYPE attribute of the given input metadata is expected to contain the type of the input document. If that attribute exists and contains a valid type name, then that type is returned.
-