public interface ContentType
Content-Type
header value.Modifier and Type | Interface and Description |
---|---|
static class |
ContentType.Builder
A builder of
ContentType . |
Modifier and Type | Method and Description |
---|---|
default java.util.Optional<java.lang.String> |
boundary()
Returns the boundary specified in the
Content-Type header or an empty
Optional if the header does not contain a boundary. |
default java.util.Optional<java.lang.String> |
charset()
Returns the charset specified in the
Content-Type header or an empty Optional
if the header does not contain a charset. |
default java.lang.String |
mediaType()
Returns the media type (the MIME type) specified in the
Content-Type header. |
static ContentType.Builder |
newBuilder(java.lang.String mediaType)
Create a new
ContentType builder. |
static ContentType.Builder newBuilder(java.lang.String mediaType)
ContentType
builder.default java.lang.String mediaType()
Content-Type
header.default java.util.Optional<java.lang.String> charset()
Content-Type
header or an empty Optional
if the header does not contain a charset.default java.util.Optional<java.lang.String> boundary()
Content-Type
header or an empty
Optional
if the header does not contain a boundary.