Interface MediaType.WithOpenCharset

All Superinterfaces:
MediaType, MediaType.NonBinary
All Known Implementing Classes:
MediaType.NonMultipartWithOpenCharset, MediaType.WithOpenCharset
Enclosing interface:

public static interface MediaType.WithOpenCharset extends MediaType.NonBinary
  • Method Details

    • toContentType

      ContentType.WithCharset toContentType(HttpCharset charset)
      Turns the media type into a content type with the given charset.
      charset - (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.