| Package | Description |
|---|---|
| com.okta.commons.http |
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
MediaType.ALL
Public constant media type that includes all media ranges (i.e.
|
static MediaType |
MediaType.APPLICATION_ATOM_XML
Public constant media type for
application/atom+xml. |
static MediaType |
MediaType.APPLICATION_FORM_URLENCODED
Public constant media type for
application/x-www-form-urlencoded. |
static MediaType |
MediaType.APPLICATION_JSON
Public constant media type for
application/json. |
static MediaType |
MediaType.APPLICATION_JSON_UTF8
Public constant media type for
application/json;charset=UTF-8. |
static MediaType |
MediaType.APPLICATION_OCTET_STREAM
Public constant media type for
application/octet-stream. |
static MediaType |
MediaType.APPLICATION_PDF
Public constant media type for
application/pdf. |
static MediaType |
MediaType.APPLICATION_PROBLEM_JSON
Public constant media type for
application/problem+json. |
static MediaType |
MediaType.APPLICATION_PROBLEM_JSON_UTF8
Public constant media type for
application/problem+json. |
static MediaType |
MediaType.APPLICATION_PROBLEM_XML
Public constant media type for
application/problem+xml. |
static MediaType |
MediaType.APPLICATION_RSS_XML
Public constant media type for
application/rss+xml. |
static MediaType |
MediaType.APPLICATION_STREAM_JSON
Public constant media type for
application/stream+json. |
static MediaType |
MediaType.APPLICATION_XHTML_XML
Public constant media type for
application/xhtml+xml. |
static MediaType |
MediaType.APPLICATION_XML
Public constant media type for
application/xml. |
static MediaType |
MediaType.IMAGE_GIF
Public constant media type for
image/gif. |
static MediaType |
MediaType.IMAGE_JPEG
Public constant media type for
image/jpeg. |
static MediaType |
MediaType.IMAGE_PNG
Public constant media type for
image/png. |
static MediaType |
MediaType.MULTIPART_FORM_DATA
Public constant media type for
multipart/form-data. |
static MediaType |
MediaType.TEXT_EVENT_STREAM
Public constant media type for
text/event-stream. |
static MediaType |
MediaType.TEXT_HTML
Public constant media type for
text/html. |
static MediaType |
MediaType.TEXT_MARKDOWN
Public constant media type for
text/markdown. |
static MediaType |
MediaType.TEXT_PLAIN
Public constant media type for
text/plain. |
static MediaType |
MediaType.TEXT_XML
Public constant media type for
text/xml. |
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<MediaType> |
MediaType.QUALITY_VALUE_COMPARATOR
Comparator used by
sortByQualityValue(List). |
static java.util.Comparator<MediaType> |
MediaType.SPECIFICITY_COMPARATOR
Comparator used by
sortBySpecificity(List). |
| Modifier and Type | Method and Description |
|---|---|
static MediaType |
MediaType.asMediaType(MimeType mimeType)
Re-create the given mime type as a media type.
|
MediaType |
MediaType.copyQualityValue(MediaType mediaType)
Return a replica of this instance with the quality value of the given MediaType.
|
MediaType |
HttpHeaders.getContentType()
Return the media type of the body, as specified by the
Content-Type header. |
static MediaType |
MediaType.parseMediaType(java.lang.String mediaType)
Parse the given String into a single
MediaType. |
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 a
MediaType object,
with this method name following the 'valueOf' naming convention. |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<MediaType> |
MediaType.asMediaTypes(java.util.List<MimeType> mimeTypes)
Re-create the given mime types as media types.
|
java.util.List<MediaType> |
HttpHeaders.getAccept()
Return the list of acceptable media types, as specified by the
Accept header. |
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 of
MediaType objects. |
static java.util.List<MediaType> |
MediaType.parseMediaTypes(java.lang.String mediaTypes)
Parse the given comma-separated string into a list of
MediaType objects. |
| Modifier and Type | Method and Description |
|---|---|
MediaType |
MediaType.copyQualityValue(MediaType mediaType)
Return a replica of this instance with the quality value of the given MediaType.
|
boolean |
MediaType.includes(MediaType other)
Indicate whether this
MediaType includes the given media type. |
boolean |
MediaType.isCompatibleWith(MediaType other)
Indicate whether this
MediaType is compatible with the given media type. |
void |
HttpHeaders.setContentType(MediaType mediaType)
Set the media type of the body, as specified by the
Content-Type header. |
| Modifier and Type | Method and Description |
|---|---|
void |
HttpHeaders.setAccept(java.util.List<MediaType> acceptableMediaTypes)
Set the list of acceptable media types, as specified by the
Accept header. |
static void |
MediaType.sortByQualityValue(java.util.List<MediaType> mediaTypes)
Sorts the given list of
MediaType objects by quality value. |
static void |
MediaType.sortBySpecificity(java.util.List<MediaType> mediaTypes)
Sorts the given list of
MediaType objects by specificity. |
static void |
MediaType.sortBySpecificityAndQuality(java.util.List<MediaType> mediaTypes)
Sorts the given list of
MediaType 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 of
MediaType objects. |
| Constructor and Description |
|---|
DefaultResponse(int httpStatus,
MediaType contentType,
java.io.InputStream body,
long contentLength) |
MediaType(MediaType other,
java.nio.charset.Charset charset)
Copy-constructor that copies the type, subtype and parameters of the given
MediaType, 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 given
MediaType,
and allows for different parameter. |
Copyright © 2018-2021 Okta. All Rights Reserved.