public abstract static class MediaType.WithOpenCharset extends MediaType.NonBinary implements MediaType.WithOpenCharset
MediaType.Binary, MediaType.Compressibility, MediaType.Compressible$, MediaType.Gzipped$, MediaType.Multipart, MediaType.NonBinary, MediaType.NonMultipartWithOpenCharset, MediaType.NotCompressible$, MediaType.WithFixedCharset, MediaType.WithOpenCharset
MediaType.Binary, MediaType.Compressibility, MediaType.Multipart, MediaType.NonBinary, MediaType.WithFixedCharset, MediaType.WithOpenCharset
Constructor and Description |
---|
WithOpenCharset(java.lang.String _mainType,
java.lang.String _subType) |
Modifier and Type | Method and 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) |
binary, comp, withComp
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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
binary, isApplication, isAudio, isCompressible, isImage, isMessage, isMultipart, isText, isVideo, mainType, subType, toRange, toRange
render, toString, value, valueBytes
withQValue
public WithOpenCharset(java.lang.String _mainType, java.lang.String _subType)
public ContentType.WithCharset toContentType(HttpCharset charset)
JAVA API
toContentType
in interface MediaType.WithOpenCharset
charset
- (undocumented)public ContentType.WithMissingCharset toContentTypeWithMissingCharset()
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
toContentTypeWithMissingCharset
in interface MediaType.WithOpenCharset
public ContentType.WithCharset withCharset(HttpCharset charset)
public ContentType.WithMissingCharset withMissingCharset()
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.
public MediaType.WithOpenCharset withParams(scala.collection.immutable.Map<java.lang.String,java.lang.String> params)
withParams
in class MediaType