Package akka.http.javadsl.model
Interface MediaType.WithOpenCharset
- All Superinterfaces:
MediaType
,MediaType.NonBinary
- All Known Implementing Classes:
MediaType.NonMultipartWithOpenCharset
,MediaType.WithOpenCharset
- Enclosing interface:
- MediaType
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.http.javadsl.model.MediaType
MediaType.Binary, MediaType.Compressibility, MediaType.Multipart, MediaType.NonBinary, MediaType.WithFixedCharset, MediaType.WithOpenCharset
-
Method Summary
Modifier and TypeMethodDescriptiontoContentType
(HttpCharset charset) Turns the media type into a content type with the given charset.Turns the media type into a content type without specifying a charset.Methods inherited from interface akka.http.javadsl.model.MediaType
binary, isApplication, isAudio, isCompressible, isImage, isMessage, isMultipart, isText, isVideo, mainType, subType, toRange, toRange
-
Method Details
-
toContentType
Turns the media type into a content type with the given charset.- Parameters:
charset
- (undocumented)- Returns:
- (undocumented)
-
toContentTypeWithMissingCharset
ContentType.WithMissingCharset toContentTypeWithMissingCharset()Turns the media type into a content type without specifying a charset.This is generally NOT what you want, since you're hiding the actual character encoding of your content, making decoding it possibly ambiguous.
Consider using toContentType(charset: HttpCharset) instead.
- Returns:
- (undocumented)
-