Uses of Class
com.aspectran.web.support.http.MediaType
-
Packages that use MediaType Package Description com.aspectran.undertow.adapter com.aspectran.web.activity.request com.aspectran.web.activity.response com.aspectran.web.adapter Contains a variant of the adapter interface for web application.com.aspectran.web.support.http -
-
Uses of MediaType in com.aspectran.undertow.adapter
Methods in com.aspectran.undertow.adapter that return MediaType Modifier and Type Method Description MediaType
TowRequestAdapter. getMediaType()
Gets the media type value included in the Content-Type header. -
Uses of MediaType in com.aspectran.web.activity.request
Fields in com.aspectran.web.activity.request with type parameters of type MediaType Modifier and Type Field Description static java.util.List<MediaType>
RequestHeaderParser. MEDIA_TYPE_ALL_LIST
A singleton list withALL
that is returned fromRequestHeaderParser.resolveAcceptContentTypes(com.aspectran.core.adapter.RequestAdapter)
when no specific media types are requested.Methods in com.aspectran.web.activity.request that return types with arguments of type MediaType Modifier and Type Method Description static java.util.List<MediaType>
RequestHeaderParser. resolveAcceptContentTypes(RequestAdapter requestAdapter)
Methods in com.aspectran.web.activity.request with parameters of type MediaType Modifier and Type Method Description static boolean
WebRequestBodyParser. isMultipartForm(MethodType requestMethod, MediaType mediaType)
static boolean
WebRequestBodyParser. isURLEncodedForm(MediaType mediaType)
static <T extends Parameters>
TWebRequestBodyParser. parseBodyAsParameters(RequestAdapter requestAdapter, MediaType mediaType, java.lang.Class<T> requiredType)
-
Uses of MediaType in com.aspectran.web.activity.response
Methods in com.aspectran.web.activity.response that return MediaType Modifier and Type Method Description protected MediaType
AbstractRestResponse. determineContentType(Activity activity)
protected abstract MediaType
AbstractRestResponse. getContentTypeByPathExtension(java.lang.String extension)
protected MediaType
DefaultRestResponse. getContentTypeByPathExtension(java.lang.String extension)
MediaType
AbstractRestResponse. getDefaultContentType()
MediaType
RestResponse. getDefaultContentType()
Methods in com.aspectran.web.activity.response that return types with arguments of type MediaType Modifier and Type Method Description protected abstract java.util.List<MediaType>
AbstractRestResponse. getSupportedContentTypes()
protected java.util.List<MediaType>
DefaultRestResponse. getSupportedContentTypes()
Methods in com.aspectran.web.activity.response with parameters of type MediaType Modifier and Type Method Description RestResponse
AbstractRestResponse. defaultContentType(MediaType defaultContentType)
RestResponse
RestResponse. defaultContentType(MediaType defaultContentType)
void
AbstractRestResponse. setDefaultContentType(MediaType defaultContentType)
void
RestResponse. setDefaultContentType(MediaType defaultContentType)
protected void
DefaultRestResponse. transformByContentType(Activity activity, java.lang.String encoding, MediaType contentType)
-
Uses of MediaType in com.aspectran.web.adapter
Methods in com.aspectran.web.adapter that return MediaType Modifier and Type Method Description MediaType
HttpServletRequestAdapter. getMediaType()
Gets the media type value included in the Content-Type header. -
Uses of MediaType in com.aspectran.web.support.http
Classes in com.aspectran.web.support.http with type parameters of type MediaType Modifier and Type Class Description static class
MediaType.SpecificityComparator<T extends MediaType>
Comparator to sortMediaTypes
in order of specificity.Fields in com.aspectran.web.support.http declared as MediaType Modifier and Type Field Description static MediaType
MediaType. ALL
Public constant media type that includes all media ranges (i.e.static MediaType
MediaTypeUtils. ALL
Public constant media type that includes all media ranges (i.e.static MediaType
MediaType. APPLICATION_APON
Public constant media type forapplication/apon
.static MediaType
MediaType. APPLICATION_ATOM_XML
Public constant media type forapplication/atom+xml
.static MediaType
MediaType. APPLICATION_CBOR
Public constant media type forapplication/cbor
.static MediaType
MediaType. APPLICATION_FORM_URLENCODED
Public constant media type forapplication/x-www-form-urlencoded
.static MediaType
MediaType. APPLICATION_GRAPHQL
Public constant media type forapplication/graphql
.static MediaType
MediaType. APPLICATION_JSON
Public constant media type forapplication/json
.static MediaType
MediaTypeUtils. APPLICATION_JSON
Public constant media type forapplication/json
.static MediaType
MediaType. APPLICATION_OCTET_STREAM
Public constant media type forapplication/octet-stream
.static MediaType
MediaTypeUtils. APPLICATION_OCTET_STREAM
Public constant media type forapplication/octet-stream
.static MediaType
MediaType. APPLICATION_PDF
Public constant media type forapplication/pdf
.static MediaType
MediaType. APPLICATION_PROBLEM_JSON
Public constant media type forapplication/problem+json
.static MediaType
MediaType. APPLICATION_PROBLEM_XML
Public constant media type forapplication/problem+xml
.static MediaType
MediaType. APPLICATION_RSS_XML
Public constant media type forapplication/rss+xml
.static MediaType
MediaType. APPLICATION_STREAM_JSON
Public constant media type forapplication/stream+json
.static MediaType
MediaType. APPLICATION_XHTML_XML
Public constant media type forapplication/xhtml+xml
.static MediaType
MediaType. APPLICATION_XML
Public constant media type forapplication/xml
.static MediaType
MediaTypeUtils. APPLICATION_XML
Public constant media type forapplication/xml
.static MediaType
MediaType. IMAGE_GIF
Public constant media type forimage/gif
.static MediaType
MediaTypeUtils. IMAGE_GIF
Public constant media type forimage/gif
.static MediaType
MediaType. IMAGE_JPEG
Public constant media type forimage/jpeg
.static MediaType
MediaTypeUtils. IMAGE_JPEG
Public constant media type forimage/jpeg
.static MediaType
MediaType. IMAGE_PNG
Public constant media type forimage/png
.static MediaType
MediaTypeUtils. IMAGE_PNG
Public constant media type forimage/png
.static MediaType
MediaType. MULTIPART_FORM_DATA
Public constant media type formultipart/form-data
.static MediaType
MediaType. TEXT_EVENT_STREAM
Public constant media type fortext/event-stream
.static MediaType
MediaType. TEXT_HTML
Public constant media type fortext/html
.static MediaType
MediaTypeUtils. TEXT_HTML
Public constant media type fortext/html
.static MediaType
MediaType. TEXT_MARKDOWN
Public constant media type fortext/markdown
.static MediaType
MediaType. TEXT_PLAIN
Public constant media type fortext/plain
.static MediaType
MediaTypeUtils. TEXT_PLAIN
Public constant media type fortext/plain
.static MediaType
MediaType. TEXT_XML
Public constant media type fortext/xml
.static MediaType
MediaTypeUtils. TEXT_XML
Public constant media type fortext/xml
.Fields in com.aspectran.web.support.http with type parameters of type MediaType Modifier and Type Field Description static java.util.Comparator<MediaType>
MediaType. QUALITY_VALUE_COMPARATOR
Comparator used bysortByQualityValue(List)
.static java.util.Comparator<MediaType>
MediaType. SPECIFICITY_COMPARATOR
Comparator used bysortBySpecificity(List)
.static java.util.Comparator<MediaType>
MediaTypeUtils. SPECIFICITY_COMPARATOR
Comparator used byMediaTypeUtils.sortBySpecificity(List)
.Methods in com.aspectran.web.support.http that return MediaType Modifier and Type Method Description MediaType
MediaType. copyQualityValue(MediaType mediaType)
Return a replica of this instance with the quality value of the givenMediaType
.MediaType
HttpMediaTypeNotSupportedException. getContentType()
Return the HTTP request content type method that caused the failure.static MediaType
MediaType. parseMediaType(java.lang.String mediaType)
Parse the given String into a singleMediaType
.static MediaType
MediaTypeUtils. parseMediaType(java.lang.String mediaType)
Parse the given String into a singleMediaType
.MediaType
MediaType. removeQualityValue()
Return a replica of this instance with its quality value removed.static MediaType
MediaType. valueOf(java.lang.String value)
Parse the given String value into aMediaType
object, with this method name following the 'valueOf' naming convention.Methods in com.aspectran.web.support.http that return types with arguments of type MediaType Modifier and Type Method Description java.util.List<MediaType>
HttpMediaTypeException. getSupportedMediaTypes()
Return the list of supported media types.static java.util.List<MediaType>
MediaType. parseMediaTypes(java.lang.String mediaTypes)
Parse the comma-separated string into a list ofMediaType
objects.static java.util.List<MediaType>
MediaType. parseMediaTypes(java.util.List<java.lang.String> mediaTypes)
Parse the given list of (potentially) comma-separated strings into a list ofMediaType
objects.static java.util.List<MediaType>
MediaTypeUtils. parseMediaTypes(java.lang.String mediaTypes)
Parse the comma-separated string into a list ofMediaType
objects.Methods in com.aspectran.web.support.http with parameters of type MediaType Modifier and Type Method Description int
MediaType. compareTo(MediaType other)
Compares this Media Type to another alphabetically.MediaType
MediaType. copyQualityValue(MediaType mediaType)
Return a replica of this instance with the quality value of the givenMediaType
.boolean
MediaType. equalsTypeAndSubtype(MediaType other)
Similar toequals(Object)
but based on the type and subtype only, i.e.boolean
MediaType. includes(MediaType other)
Indicate whether thisMediaType
includes the given media type.boolean
MediaType. isCompatibleWith(MediaType other)
Indicate whether thisMediaType
is compatible with the given media type.Method parameters in com.aspectran.web.support.http with type arguments of type MediaType Modifier and Type Method Description boolean
MediaType. isPresentIn(java.util.Collection<MediaType> MediaTypes)
UnlikeCollection.contains(Object)
which relies onequals(Object)
, this method only checks the type and the subtype, but otherwise ignores parameters.static void
MediaType. sortByQualityValue(java.util.List<MediaType> mediaTypes)
Sorts the given list ofMediaType
objects by quality value.static void
MediaType. sortBySpecificity(java.util.List<MediaType> mediaTypes)
Sorts the given list ofMediaType
objects by specificity.static void
MediaTypeUtils. sortBySpecificity(java.util.List<MediaType> mediaTypes)
Sorts the given list ofMediaType
objects by specificity.static void
MediaType. sortBySpecificityAndQuality(java.util.List<MediaType> mediaTypes)
Sorts the given list ofMediaType
objects by specificity as the primary criteria and quality value the secondary.static java.lang.String
MediaType. toString(java.util.Collection<MediaType> mediaTypes)
Return a string representation of the given list ofMediaType
objects.static java.lang.String
MediaTypeUtils. toString(java.util.Collection<MediaType> mediaTypes)
Return a string representation of the given list ofMediaType
objects.Constructors in com.aspectran.web.support.http with parameters of type MediaType Constructor Description HttpMediaTypeNotSupportedException(MediaType contentType, java.util.List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, java.util.List<MediaType> supportedMediaTypes, java.lang.String msg)
Create a new HttpMediaTypeNotSupportedException.MediaType(MediaType other, java.nio.charset.Charset charset)
Copy-constructor that copies the type, subtype and parameters of the givenMediaType
, and allows to set the specified character set.MediaType(MediaType other, java.util.Map<java.lang.String,java.lang.String> parameters)
Copy-constructor that copies the type and subtype of the givenMediaType
, and allows for different parameter.Constructor parameters in com.aspectran.web.support.http with type arguments of type MediaType Constructor Description HttpMediaTypeException(java.lang.String message, java.util.List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeException with a list of supported media types.HttpMediaTypeNotAcceptableException(java.util.List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, java.util.List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, java.util.List<MediaType> supportedMediaTypes, java.lang.String msg)
Create a new HttpMediaTypeNotSupportedException.
-