Package org.junit.jupiter.api.extension
Class MediaType
- java.lang.Object
-
- org.junit.jupiter.api.MediaType
-
- org.junit.jupiter.api.extension.MediaType
-
-
Field Summary
Fields Modifier and Type Field Description static MediaTypeAPPLICATION_JSONDeprecated.Theapplication/jsonmedia type.static MediaTypeAPPLICATION_JSON_UTF_8Deprecated.UseAPPLICATION_JSONinstead.static MediaTypeAPPLICATION_OCTET_STREAMDeprecated.Theapplication/octet-streammedia type.static MediaTypeIMAGE_JPEGDeprecated.Theimage/jpegmedia type.static MediaTypeIMAGE_PNGDeprecated.Theimage/pngmedia type.static MediaTypeTEXT_PLAINDeprecated.Thetext/plainmedia type.static MediaTypeTEXT_PLAIN_UTF_8Deprecated.Thetext/plain; charset=UTF-8media type.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MediaTypecreate(java.lang.String type, java.lang.String subtype)Deprecated.Create a media type with the given type and subtype.static MediaTypecreate(java.lang.String type, java.lang.String subtype, java.nio.charset.Charset charset)Deprecated.Create a media type with the given type, subtype, and charset.static MediaTypeparse(java.lang.String value)Deprecated.Parse the given media type value.
-
-
-
Field Detail
-
TEXT_PLAIN
public static final MediaType TEXT_PLAIN
Deprecated.Thetext/plainmedia type.
-
TEXT_PLAIN_UTF_8
public static final MediaType TEXT_PLAIN_UTF_8
Deprecated.Thetext/plain; charset=UTF-8media type.
-
APPLICATION_JSON
public static final MediaType APPLICATION_JSON
Deprecated.Theapplication/jsonmedia type.
-
APPLICATION_JSON_UTF_8
@Deprecated @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
public static final MediaType APPLICATION_OCTET_STREAM
Deprecated.Theapplication/octet-streammedia type.
-
IMAGE_JPEG
public static final MediaType IMAGE_JPEG
Deprecated.Theimage/jpegmedia type.
-
IMAGE_PNG
public static final MediaType IMAGE_PNG
Deprecated.Theimage/pngmedia type.
-
-
Method Detail
-
parse
public static MediaType parse(java.lang.String value)
Deprecated.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
public static MediaType create(java.lang.String type, java.lang.String subtype)
Deprecated.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
public static MediaType create(java.lang.String type, java.lang.String subtype, java.nio.charset.Charset charset)
Deprecated.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
-
-