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
public interface ContentType extends ContentType, ValueRenderable
AContentType
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 Classes Modifier and Type Interface 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$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description scala.Option<HttpCharset>
charsetOption()
java.util.Optional<HttpCharset>
getCharsetOption()
Java APIMediaType
mediaType()
The media-type of this content-type.<R extends Rendering>
Renderingrender(R r)
java.lang.String
toString()
-
Methods inherited from interface akka.http.javadsl.model.ContentType
binary
-
Methods inherited from interface akka.http.impl.util.ValueRenderable
value
-
-
-
-
Method Detail
-
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
java.lang.String toString()
- Specified by:
toString
in interfaceToStringRenderable
- Overrides:
toString
in classjava.lang.Object
-
render
<R extends Rendering> Rendering render(R r)
- Specified by:
render
in interfaceRenderable
-
getCharsetOption
java.util.Optional<HttpCharset> getCharsetOption()
Java API- Specified by:
getCharsetOption
in interfaceContentType
- Returns:
- (undocumented)
-
-