Uses of Class
com.okta.commons.http.MediaType
Packages that use MediaType
-
Uses of MediaType in com.okta.commons.http
Fields in com.okta.commons.http declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaTypeMediaType.ALLPublic constant media type that includes all media ranges (i.estatic final MediaTypeMediaType.APPLICATION_ATOM_XMLPublic constant media type forapplication/atom+xml.static final MediaTypeMediaType.APPLICATION_FORM_URLENCODEDPublic constant media type forapplication/x-www-form-urlencoded.static final MediaTypeMediaType.APPLICATION_JSONPublic constant media type forapplication/json.static final MediaTypeMediaType.APPLICATION_JSON_UTF8Public constant media type forapplication/json;charset=UTF-8.static final MediaTypeMediaType.APPLICATION_OCTET_STREAMPublic constant media type forapplication/octet-stream.static final MediaTypeMediaType.APPLICATION_PDFPublic constant media type forapplication/pdf.static final MediaTypeMediaType.APPLICATION_PROBLEM_JSONPublic constant media type forapplication/problem+json.static final MediaTypeMediaType.APPLICATION_PROBLEM_JSON_UTF8Public constant media type forapplication/problem+json.static final MediaTypeMediaType.APPLICATION_PROBLEM_XMLPublic constant media type forapplication/problem+xml.static final MediaTypeMediaType.APPLICATION_RSS_XMLPublic constant media type forapplication/rss+xml.static final MediaTypeMediaType.APPLICATION_STREAM_JSONPublic constant media type forapplication/stream+json.static final MediaTypeMediaType.APPLICATION_XHTML_XMLPublic constant media type forapplication/xhtml+xml.static final MediaTypeMediaType.APPLICATION_XMLPublic constant media type forapplication/xml.static final MediaTypeMediaType.IMAGE_GIFPublic constant media type forimage/gif.static final MediaTypeMediaType.IMAGE_JPEGPublic constant media type forimage/jpeg.static final MediaTypeMediaType.IMAGE_PNGPublic constant media type forimage/png.static final MediaTypeMediaType.MULTIPART_FORM_DATAPublic constant media type formultipart/form-data.static final MediaTypeMediaType.TEXT_EVENT_STREAMPublic constant media type fortext/event-stream.static final MediaTypeMediaType.TEXT_HTMLPublic constant media type fortext/html.static final MediaTypeMediaType.TEXT_MARKDOWNPublic constant media type fortext/markdown.static final MediaTypeMediaType.TEXT_PLAINPublic constant media type fortext/plain.static final MediaTypeMediaType.TEXT_XMLPublic constant media type fortext/xml.Fields in com.okta.commons.http with type parameters of type MediaTypeModifier and TypeFieldDescriptionstatic final Comparator<MediaType> MediaType.QUALITY_VALUE_COMPARATORComparator used bysortByQualityValue(List).static final Comparator<MediaType> MediaType.SPECIFICITY_COMPARATORComparator used bysortBySpecificity(List).Methods in com.okta.commons.http that return MediaTypeModifier and TypeMethodDescriptionstatic MediaTypeMediaType.asMediaType(MimeType mimeType) Re-create the given mime type as a media type.MediaType.copyQualityValue(MediaType mediaType) Return a replica of this instance with the quality value of the given MediaType.HttpHeaders.getContentType()Return the media type of the body, as specified by theContent-Typeheader.static MediaTypeMediaType.parseMediaType(String mediaType) Parse the given String into a singleMediaType.MediaType.removeQualityValue()Return a replica of this instance with its quality value removed.static MediaTypeParse the given String value into aMediaTypeobject, with this method name following the 'valueOf' naming convention.Methods in com.okta.commons.http that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionMediaType.asMediaTypes(List<MimeType> mimeTypes) Re-create the given mime types as media types.HttpHeaders.getAccept()Return the list of acceptable media types, as specified by theAcceptheader.MediaType.parseMediaTypes(String mediaTypes) Parse the given comma-separated string into a list ofMediaTypeobjects.MediaType.parseMediaTypes(List<String> mediaTypes) Parse the given list of (potentially) comma-separated strings into a list ofMediaTypeobjects.Methods in com.okta.commons.http with parameters of type MediaTypeModifier and TypeMethodDescriptionMediaType.copyQualityValue(MediaType mediaType) Return a replica of this instance with the quality value of the given MediaType.booleanIndicate whether thisMediaTypeincludes the given media type.booleanMediaType.isCompatibleWith(MediaType other) Indicate whether thisMediaTypeis compatible with the given media type.voidHttpHeaders.setContentType(MediaType mediaType) Set the media type of the body, as specified by theContent-Typeheader.Method parameters in com.okta.commons.http with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidSet the list of acceptable media types, as specified by theAcceptheader.static voidMediaType.sortByQualityValue(List<MediaType> mediaTypes) Sorts the given list ofMediaTypeobjects by quality value.static voidMediaType.sortBySpecificity(List<MediaType> mediaTypes) Sorts the given list ofMediaTypeobjects by specificity.static voidMediaType.sortBySpecificityAndQuality(List<MediaType> mediaTypes) Sorts the given list ofMediaTypeobjects by specificity as the primary criteria and quality value the secondary.static StringMediaType.toString(Collection<MediaType> mediaTypes) Return a string representation of the given list ofMediaTypeobjects.Constructors in com.okta.commons.http with parameters of type MediaTypeModifierConstructorDescriptionDefaultResponse(int httpStatus, MediaType contentType, InputStream body, long contentLength) Copy-constructor that copies the type, subtype and parameters of the givenMediaType, and allows to set the specified character set.Copy-constructor that copies the type and subtype of the givenMediaType, and allows for different parameter.