@Immutable @ThreadSafe public final class NameOnlyDetector extends TikaMimeTypeDetector
MimeTypeDetector
implementation which uses Apache Tika to determine the mimetype of a given binary, based only
on the name of the binary property.logger
Constructor and Description |
---|
NameOnlyDetector(Environment environment)
Creates a new name based detector
|
Modifier and Type | Method and Description |
---|---|
protected String |
detect(InputStream inputStream,
org.apache.tika.metadata.Metadata metadata) |
protected void |
initDetector(ClassLoader loader) |
mimeTypeOf
public NameOnlyDetector(Environment environment)
environment
- the Environment
to use for class loading; may not be null
protected void initDetector(ClassLoader loader)
initDetector
in class TikaMimeTypeDetector
protected String detect(InputStream inputStream, org.apache.tika.metadata.Metadata metadata)
detect
in class TikaMimeTypeDetector
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.