Class MediaType.WithOpenCharset
java.lang.Object
org.apache.pekko.http.scaladsl.model.MediaType
org.apache.pekko.http.scaladsl.model.MediaType.NonBinary
org.apache.pekko.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 org.apache.pekko.http.scaladsl.model.MediaType
MediaType.Binary, MediaType.Compressibility, MediaType.Compressible$, MediaType.Gzipped$, MediaType.Multipart, MediaType.NonBinary, MediaType.NonMultipartWithOpenCharset, MediaType.NotCompressible$, MediaType.WithFixedCharset, MediaType.WithOpenCharsetNested classes/interfaces inherited from interface org.apache.pekko.http.javadsl.model.MediaType
MediaType.Binary, MediaType.Compressibility, MediaType.Multipart, MediaType.NonBinary, MediaType.WithFixedCharset, MediaType.WithOpenCharset -
Constructor Summary
Constructors -
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.withCharset(HttpCharset charset) Turns the media type into a content type without specifying a charset.withParams(scala.collection.immutable.Map<String, String> params) Methods inherited from class org.apache.pekko.http.scaladsl.model.MediaType.NonBinary
binary, comp, withCompMethods inherited from class org.apache.pekko.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, withQValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.http.impl.util.LazyValueBytesRenderable
render, toString, value, valueBytesMethods inherited from interface org.apache.pekko.http.javadsl.model.MediaType
binary, isApplication, isAudio, isCompressible, isImage, isMessage, isMultipart, isText, isVideo, mainType, subType, toRange, toRange, valueMethods inherited from interface org.apache.pekko.http.scaladsl.model.WithQValue
withQValue
-
Constructor Details
-
WithOpenCharset
-
-
Method Details
-
toContentType
Turns the media type into a content type with the given charset.JAVA API
- Specified by:
toContentTypein interfaceMediaType.WithOpenCharset- Parameters:
charset- (undocumented)- Returns:
- (undocumented)
-
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:
toContentTypeWithMissingCharsetin interfaceMediaType.WithOpenCharset- Returns:
- (undocumented)
-
withCharset
-
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
- Specified by:
withParamsin classMediaType
-