Package org.opensearch.common.xcontent
Class MediaTypeParser<T extends MediaType>
java.lang.Object
org.opensearch.common.xcontent.MediaTypeParser<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA media type object that contains all the information provided on a Content-Type or Accept header -
Constructor Summary
ConstructorsConstructorDescriptionMediaTypeParser(T[] acceptedMediaTypes) MediaTypeParser(T[] acceptedMediaTypes, Map<String, T> additionalMediaTypes) -
Method Summary
Modifier and TypeMethodDescriptionfromFormat(String format) fromMediaType(String mediaType) parseMediaType(String headerValue) parsing media type that follows https://tools.ietf.org/html/rfc7231#section-3.1.1.1
-
Constructor Details
-
MediaTypeParser
-
MediaTypeParser
-
-
Method Details
-
fromMediaType
-
fromFormat
-
parseMediaType
parsing media type that follows https://tools.ietf.org/html/rfc7231#section-3.1.1.1- Parameters:
headerValue- a header value from Accept or Content-Type- Returns:
- a parsed media-type
-