Package akka.http.scaladsl.model
Class MediaType.WithOpenCharset
- java.lang.Object
-
- akka.http.scaladsl.model.MediaType
-
- akka.http.scaladsl.model.MediaType.NonBinary
-
- akka.http.scaladsl.model.MediaType.WithOpenCharset
-
- All Implemented Interfaces:
LazyValueBytesRenderable
,Renderable
,MediaType
,MediaType.NonBinary
,MediaType.WithOpenCharset
,WithQValue<MediaRange>
- Direct Known Subclasses:
MediaType.NonMultipartWithOpenCharset
- Enclosing class:
- MediaType
public abstract static class MediaType.WithOpenCharset extends MediaType.NonBinary implements MediaType.WithOpenCharset
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.http.scaladsl.model.MediaType
MediaType.Binary, MediaType.Compressibility, MediaType.Compressible$, MediaType.Gzipped$, MediaType.Multipart, MediaType.NonBinary, MediaType.NonMultipartWithOpenCharset, MediaType.NotCompressible$, MediaType.WithFixedCharset, MediaType.WithOpenCharset
-
Nested classes/interfaces inherited from interface akka.http.javadsl.model.MediaType
MediaType.Binary, MediaType.Compressibility, MediaType.Multipart, MediaType.NonBinary, MediaType.WithFixedCharset, MediaType.WithOpenCharset
-
-
Constructor Summary
Constructors Constructor Description WithOpenCharset(java.lang.String _mainType, java.lang.String _subType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentType.WithCharset
toContentType(HttpCharset charset)
Turns the media type into a content type with the given charset.ContentType.WithMissingCharset
toContentTypeWithMissingCharset()
Turns the media type into a content type without specifying a charset.ContentType.WithCharset
withCharset(HttpCharset charset)
ContentType.WithMissingCharset
withMissingCharset()
Turns the media type into a content type without specifying a charset.MediaType.WithOpenCharset
withParams(scala.collection.immutable.Map<java.lang.String,java.lang.String> params)
-
Methods inherited from class akka.http.scaladsl.model.MediaType.NonBinary
binary, comp, withComp
-
Methods inherited from class akka.http.scaladsl.model.MediaType
applicationBinary, applicationWithFixedCharset, applicationWithOpenCharset, audio, custom, customBinary, customMultipart, customWithFixedCharset, customWithOpenCharset, equals, fileExtensions, font, hashCode, image, isApplication, isAudio, isCompressible, isImage, isMessage, isMultipart, isText, isVideo, mainType, message, params, parse, subType, text, textWithFixedCharset, toRange, toRange, unapply, video, withQValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.http.impl.util.LazyValueBytesRenderable
render, toString, value, valueBytes
-
Methods inherited from interface akka.http.javadsl.model.MediaType
binary, isApplication, isAudio, isCompressible, isImage, isMessage, isMultipart, isText, isVideo, mainType, subType, toRange, toRange
-
Methods inherited from interface akka.http.scaladsl.model.WithQValue
withQValue
-
-
-
-
Method Detail
-
toContentType
public ContentType.WithCharset toContentType(HttpCharset charset)
Turns the media type into a content type with the given charset.JAVA API
- Specified by:
toContentType
in interfaceMediaType.WithOpenCharset
- Parameters:
charset
- (undocumented)- Returns:
- (undocumented)
-
toContentTypeWithMissingCharset
public 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.
JAVA API
- Specified by:
toContentTypeWithMissingCharset
in interfaceMediaType.WithOpenCharset
- Returns:
- (undocumented)
-
withCharset
public ContentType.WithCharset withCharset(HttpCharset charset)
-
withMissingCharset
public ContentType.WithMissingCharset withMissingCharset()
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)
-
withParams
public MediaType.WithOpenCharset withParams(scala.collection.immutable.Map<java.lang.String,java.lang.String> params)
- Specified by:
withParams
in classMediaType
-
-