public interface ContentType extends ContentType, ValueRenderable
ContentType
represents a specific MediaType / HttpCharset combination.
If the MediaType is not flexible with regard to the charset used, e.g. because it's a binary MediaType or
the charset is fixed, then the ContentType
is a simple wrapper.
Modifier and Type | Interface and Description |
---|---|
static class |
ContentType.$u003B$u0020charset$eq$ |
static class |
ContentType.Binary
Represents a content-type which we know not to contain text (will never have have a charset)
|
static class |
ContentType.Binary$ |
static interface |
ContentType.NonBinary
Represents a content-type which we know to contain text, and has a specified charset.
|
static class |
ContentType.WithCharset
Represents a content-type which we know to contain text, and the charset is known at runtime.
|
static class |
ContentType.WithCharset$ |
static class |
ContentType.WithFixedCharset
Represents a content-type which we know to contain text, where the charset always has the same predefined value.
|
static class |
ContentType.WithFixedCharset$ |
static class |
ContentType.WithMissingCharset
Represents a content-type which we know to contain text, and would be better off having a charset,
but the client or server hasn't provided that.
|
static class |
ContentType.WithMissingCharset$ |
Modifier and Type | Method and Description |
---|---|
scala.Option<HttpCharset> |
charsetOption() |
java.util.Optional<HttpCharset> |
getCharsetOption()
Java API
|
MediaType |
mediaType()
The media-type of this content-type.
|
<R extends Rendering> |
render(R r) |
java.lang.String |
toString() |
binary
value
MediaType mediaType()
ContentType
mediaType
in interface ContentType
scala.Option<HttpCharset> charsetOption()
java.lang.String toString()
toString
in interface ToStringRenderable
toString
in class java.lang.Object
<R extends Rendering> Rendering render(R r)
render
in interface Renderable
java.util.Optional<HttpCharset> getCharsetOption()
getCharsetOption
in interface ContentType