Package dev.enola.common.io.mediatype
Class MarkdownMediaTypes
java.lang.Object
dev.enola.common.io.mediatype.MarkdownMediaTypes
- All Implemented Interfaces:
MediaTypeProvider
,ResourceMediaTypeDetector
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.net.MediaType
CommonMark variant, see CommonMark.org.static final com.google.common.net.MediaType
static final com.google.common.net.MediaType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.Multimap
<String, com.google.common.net.MediaType> 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, wait
Methods inherited from interface dev.enola.common.io.mediatype.MediaTypeProvider
detect
Methods inherited from interface dev.enola.common.io.mediatype.ResourceMediaTypeDetector
detect
-
Field Details
-
MARKDOWN_UTF_8
public static final com.google.common.net.MediaType MARKDOWN_UTF_8 -
COMMON_MARKDOWN_UTF_8
public static final com.google.common.net.MediaType COMMON_MARKDOWN_UTF_8CommonMark variant, see CommonMark.org. -
GFM_MARKDOWN_UTF_8
public static final com.google.common.net.MediaType GFM_MARKDOWN_UTF_8
-
-
Constructor Details
-
MarkdownMediaTypes
public MarkdownMediaTypes()
-
-
Method Details
-
extensionsToTypes
public com.google.common.collect.Multimap<String,com.google.common.net.MediaType> extensionsToTypes()Description copied from interface:MediaTypeProvider
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 useMediaTypeProvider.detect(String, ByteSource, MediaType)
instead.- Specified by:
extensionsToTypes
in interfaceMediaTypeProvider
-
knownTypesWithAlternatives
public Map<com.google.common.net.MediaType,Set<com.google.common.net.MediaType>> knownTypesWithAlternatives()Description copied from interface:MediaTypeProvider
Maps "canonical" (primary) Media Types to a set of its "also known as alternatives".- Specified by:
knownTypesWithAlternatives
in interfaceMediaTypeProvider
-