Package akka.http.scaladsl.model
Interface ContentType
- All Superinterfaces:
ContentType
,Renderable
,ToStringRenderable
,ValueRenderable
- All Known Subinterfaces:
ContentType.NonBinary
- All Known Implementing Classes:
ContentType.Binary
,ContentType.WithCharset
,ContentType.WithFixedCharset
,ContentType.WithMissingCharset
A
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static final class
Represents a content-type which we know not to contain text (will never have have a charset)static class
static interface
Represents a content-type which we know to contain text, and has a specified charset.static final class
Represents a content-type which we know to contain text, and the charset is known at runtime.static class
static final class
Represents a content-type which we know to contain text, where the charset always has the same predefined value.static class
static final class
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
-
Method Summary
Modifier and TypeMethodDescriptionscala.Option<HttpCharset>
Java APIThe media-type of this content-type.render
(R r) toString()
Methods inherited from interface akka.http.javadsl.model.ContentType
binary
Methods inherited from interface akka.http.impl.util.ValueRenderable
value
-
Method Details
-
mediaType
MediaType mediaType()Description copied from interface:ContentType
The media-type of this content-type.- Specified by:
mediaType
in interfaceContentType
- Returns:
- (undocumented)
-
charsetOption
scala.Option<HttpCharset> charsetOption() -
toString
String toString()- Specified by:
toString
in interfaceToStringRenderable
- Overrides:
toString
in classObject
-
render
- Specified by:
render
in interfaceRenderable
-
getCharsetOption
Optional<HttpCharset> getCharsetOption()Java API- Specified by:
getCharsetOption
in interfaceContentType
- Returns:
- (undocumented)
-