Class MediaType
java.lang.Object
de.gematik.test.tiger.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
de.gematik.test.tiger.mockserver.model.ObjectWithJsonToString
de.gematik.test.tiger.mockserver.model.MediaType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final CharsetJSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [RFC3629].static final CharsetThe default character set for an HTTP message, if none is specified in the Content-Type header.static final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaTypestatic final MediaType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaTypegetType()booleanisCompatible(MediaType other) booleanisJson()booleanisString()booleanisXml()static MediaTypetoString()withCharset(String charset) withCharset(Charset charset) Methods inherited from class de.gematik.test.tiger.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Field Details
-
DEFAULT_TEXT_HTTP_CHARACTER_SET
The default character set for an HTTP message, if none is specified in the Content-Type header. From the HTTP 1.1 specification section 3.7.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1):The "charset" parameter is used with some media types to define the character set (section 3.4) of the data. When no explicit charset parameter is provided by the sender, media subtypes of the "text" type are defined to have a default charset value of "ISO-8859-1" when received via HTTP. Data in character sets other than "ISO-8859-1" or its subsets MUST be labeled with an appropriate charset value. -
DEFAULT_JSON_HTTP_CHARACTER_SET
JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [RFC3629]. (https://datatracker.ietf.org/doc/html/rfc8259#section-8.1) -
WILDCARD
-
APPLICATION_ATOM_XML
-
APPLICATION_XHTML_XML
-
APPLICATION_SVG_XML
-
APPLICATION_XML
-
APPLICATION_XML_UTF_8
-
APPLICATION_JSON
-
APPLICATION_JSON_UTF_8
-
JSON_UTF_8
-
APPLICATION_FORM_URLENCODED
-
FORM_DATA
-
MULTIPART_FORM_DATA
-
APPLICATION_OCTET_STREAM
-
APPLICATION_BINARY
-
PDF
-
ATOM_UTF_8
-
TEXT_PLAIN
-
PLAIN_TEXT_UTF_8
-
TEXT_XML
-
TEXT_XML_UTF_8
-
XML_UTF_8
-
TEXT_HTML
-
TEXT_HTML_UTF_8
-
HTML_UTF_8
-
SERVER_SENT_EVENTS
-
APPLICATION_JSON_PATCH_JSON
-
ANY_VIDEO_TYPE
-
ANY_AUDIO_TYPE
-
ANY_IMAGE_TYPE
-
QUICKTIME
-
JPEG
-
PNG
-
-
Constructor Details
-
MediaType
-
MediaType
-
-
Method Details
-
parse
-
create
-
getType
-
getSubtype
-
getParameters
-
withCharset
-
withCharset
-
getCharset
-
getCharsetOrDefault
-
isCompatible
-
isJson
public boolean isJson() -
isXml
public boolean isXml() -
isString
public boolean isString() -
toString
- Overrides:
toStringin classObjectWithJsonToString
-