Package dev.enola.common.io.mediatype
Interface MediaTypeProvider
- All Superinterfaces:
ResourceMediaTypeDetector
- All Known Implementing Classes:
DatalogMediaTypes,GexfMediaType,GraphCommonsMediaType,GraphvizMediaType,HandlebarsMediaType,MarkdownMediaTypes,MediaTypeProviders,ProtobufMediaTypes,RdfMediaTypes,RdfMediaTypeYamlLd,StandardMediaTypes,TestMediaType,ThingMediaTypes,TikaMediaTypeProvider,XmlMediaType,YamlMediaType
-
Method Summary
Modifier and TypeMethodDescriptiondefault MediaTypedetect(String uri, ByteSource byteSource, MediaType original) ResourceMediaTypeDetector.detect(String, ByteSource, MediaType)default implementation usingextensionsToTypes().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 interface dev.enola.common.io.mediatype.ResourceMediaTypeDetector
detect
-
Method Details
-
knownTypesWithAlternatives
Maps "canonical" (primary) Media Types to a set of its "also known as alternatives". -
extensionsToTypes
Maps 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 usedetect(String, ByteSource, MediaType)instead. -
detect
ResourceMediaTypeDetector.detect(String, ByteSource, MediaType)default implementation usingextensionsToTypes(). This matches the "longest" filename extension (if required).- Specified by:
detectin interfaceResourceMediaTypeDetector
-