Class MediaType
java.lang.Object
org.junit.jupiter.api.MediaType
org.junit.jupiter.api.extension.MediaType
@Deprecated(since="5.14",
forRemoval=true)
@API(status=DEPRECATED,
since="5.14")
public final class MediaType
extends MediaType
Deprecated, for removal: This API element is subject to removal in a future version.
Represents a media type as defined by
RFC 2045.
- Since:
- 5.12
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Theapplication/jsonmedia type.static final MediaTypeDeprecated.UseAPPLICATION_JSONinstead.static final MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Theapplication/octet-streammedia type.static final MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Theimage/jpegmedia type.static final MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Theimage/pngmedia type.static final MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Thetext/plainmedia type.static final MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Thetext/plain; charset=UTF-8media type. -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Create a media type with the given type and subtype.static MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Create a media type with the given type, subtype, and charset.static MediaTypeDeprecated, for removal: This API element is subject to removal in a future version.Parse the given media type value.
-
Field Details
-
TEXT_PLAIN
Deprecated, for removal: This API element is subject to removal in a future version.Thetext/plainmedia type. -
TEXT_PLAIN_UTF_8
Deprecated, for removal: This API element is subject to removal in a future version.Thetext/plain; charset=UTF-8media type. -
APPLICATION_JSON
Deprecated, for removal: This API element is subject to removal in a future version.Theapplication/jsonmedia type. -
APPLICATION_JSON_UTF_8
@Deprecated(since="5.14") @API(status=DEPRECATED, since="5.14") public static final MediaType APPLICATION_JSON_UTF_8Deprecated.UseAPPLICATION_JSONinstead.Theapplication/json; charset=UTF-8media type. -
APPLICATION_OCTET_STREAM
Deprecated, for removal: This API element is subject to removal in a future version.Theapplication/octet-streammedia type. -
IMAGE_JPEG
Deprecated, for removal: This API element is subject to removal in a future version.Theimage/jpegmedia type. -
IMAGE_PNG
Deprecated, for removal: This API element is subject to removal in a future version.Theimage/pngmedia type.
-
-
Method Details
-
parse
Deprecated, for removal: This API element is subject to removal in a future version.Parse the given media type value.Must be valid according to RFC 2045.
- Parameters:
value- the media type value to parse; nevernullor blank- Returns:
- the parsed media type
- Throws:
org.junit.platform.commons.PreconditionViolationException- if the value is not a valid media type
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Create a media type with the given type and subtype.- Parameters:
type- the type; nevernullor blanksubtype- the subtype; nevernullor blank- Returns:
- the media type
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Create a media type with the given type, subtype, and charset.- Parameters:
type- the type; nevernullor blanksubtype- the subtype; nevernullor blankcharset- the charset; nevernull- Returns:
- the media type
-
MediaTypeinstead.