public final class ContentTypes
extends java.lang.Object
If the ContentType
you're looking for is not pre-defined here, you can obtain it from
a MediaType
by using: MediaTypes.TEXT_HTML.toContentType()
Modifier and Type | Field and Description |
---|---|
static ContentType.Binary |
APPLICATION_GRPC_PROTO |
static ContentType.WithFixedCharset |
APPLICATION_JSON |
static ContentType.Binary |
APPLICATION_OCTET_STREAM |
static ContentType.WithFixedCharset |
APPLICATION_X_WWW_FORM_URLENCODED |
static ContentType.Binary |
NO_CONTENT_TYPE |
static ContentType.WithCharset |
TEXT_CSV_UTF8 |
static ContentType.WithCharset |
TEXT_HTML_UTF8 |
static ContentType.WithCharset |
TEXT_PLAIN_UTF8 |
static ContentType.WithCharset |
TEXT_XML_UTF8 |
Modifier and Type | Method and Description |
---|---|
static ContentType.Binary |
create(MediaType.Binary mediaType) |
static ContentType.WithFixedCharset |
create(MediaType.WithFixedCharset mediaType) |
static ContentType.WithCharset |
create(MediaType.WithOpenCharset mediaType,
HttpCharset charset) |
static ContentType |
parse(java.lang.String contentType) |
public static final ContentType.WithFixedCharset APPLICATION_JSON
public static final ContentType.Binary APPLICATION_OCTET_STREAM
public static final ContentType.WithCharset TEXT_PLAIN_UTF8
public static final ContentType.WithCharset TEXT_HTML_UTF8
public static final ContentType.WithCharset TEXT_XML_UTF8
public static final ContentType.WithCharset TEXT_CSV_UTF8
public static final ContentType.Binary APPLICATION_GRPC_PROTO
public static final ContentType.WithFixedCharset APPLICATION_X_WWW_FORM_URLENCODED
public static final ContentType.Binary NO_CONTENT_TYPE
public static ContentType parse(java.lang.String contentType)
public static ContentType.Binary create(MediaType.Binary mediaType)
public static ContentType.WithFixedCharset create(MediaType.WithFixedCharset mediaType)
public static ContentType.WithCharset create(MediaType.WithOpenCharset mediaType, HttpCharset charset)