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
AContentTyperepresents 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
ContentTypeis a simple wrapper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classContentType.$u003B$u0020charset$eq$static classContentType.BinaryRepresents a content-type which we know not to contain text (will never have have a charset)static classContentType.Binary$static interfaceContentType.NonBinaryRepresents a content-type which we know to contain text, and has a specified charset.static classContentType.WithCharsetRepresents a content-type which we know to contain text, and the charset is known at runtime.static classContentType.WithCharset$static classContentType.WithFixedCharsetRepresents a content-type which we know to contain text, where the charset always has the same predefined value.static classContentType.WithFixedCharset$static classContentType.WithMissingCharsetRepresents 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 classContentType.WithMissingCharset$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description scala.Option<HttpCharset>charsetOption()java.util.Optional<HttpCharset>getCharsetOption()Java APIMediaTypemediaType()The media-type of this content-type.<R extends Rendering>
Renderingrender(R r)java.lang.StringtoString()-
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:ContentTypeThe media-type of this content-type.- Specified by:
mediaTypein interfaceContentType- Returns:
- (undocumented)
-
charsetOption
scala.Option<HttpCharset> charsetOption()
-
toString
java.lang.String toString()
- Specified by:
toStringin interfaceToStringRenderable- Overrides:
toStringin classjava.lang.Object
-
render
<R extends Rendering> Rendering render(R r)
- Specified by:
renderin interfaceRenderable
-
getCharsetOption
java.util.Optional<HttpCharset> getCharsetOption()
Java API- Specified by:
getCharsetOptionin interfaceContentType- Returns:
- (undocumented)
-
-