Package dev.enola.format.tika
Class TikaMediaTypeProvider
java.lang.Object
dev.enola.format.tika.TikaMediaTypeProvider
- All Implemented Interfaces:
MediaTypeProvider,ResourceMediaTypeDetector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetect(String uri, ByteSource byteSource, MediaType original) ResourceMediaTypeDetector.detect(String, ByteSource, MediaType)default implementation usingMediaTypeProvider.extensionsToTypes().Maps the URI path "extension" (WITH the dot; or not, filenames such as "README" are also permitted!) to its "canonical" Media Types.Maps "canonical" (primary) Media Types to a set of its "also known as alternatives".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.enola.common.io.mediatype.ResourceMediaTypeDetector
detect
-
Constructor Details
-
TikaMediaTypeProvider
public TikaMediaTypeProvider()
-
-
Method Details
-
knownTypesWithAlternatives
Description copied from interface:MediaTypeProviderMaps "canonical" (primary) Media Types to a set of its "also known as alternatives".- Specified by:
knownTypesWithAlternativesin interfaceMediaTypeProvider
-
extensionsToTypes
Description copied from interface:MediaTypeProviderMaps the URI path "extension" (WITH the dot; or not, filenames such as "README" are also permitted!) to its "canonical" Media Types. This should only be used for "informational" listing kind of output. To actually determine a MediaType, please useMediaTypeProvider.detect(String, ByteSource, MediaType)instead.- Specified by:
extensionsToTypesin interfaceMediaTypeProvider
-
detect
Description copied from interface:MediaTypeProviderResourceMediaTypeDetector.detect(String, ByteSource, MediaType)default implementation usingMediaTypeProvider.extensionsToTypes(). This matches the "longest" filename extension (if required).- Specified by:
detectin interfaceMediaTypeProvider- Specified by:
detectin interfaceResourceMediaTypeDetector
-