Class Charset


  • public class Charset
    extends Object
    Represents Charset.

    Charsets are technically an optional part of a MediaType.

    Author:
    Sebastian Ɓaskawiec
    • Field Detail

      • logger

        protected static final Log logger
    • Method Detail

      • fromMediaType

        public static Charset fromMediaType​(String mediaType)
        Creates Charset based on MediaType as string.
        Parameters:
        mediaType - MediaType value.
        Returns:
        Returns Charset value or null if charset is not supported.
      • getJavaCharset

        public Charset getJavaCharset()
        Creates Java Charset from this object.
        Returns:
        Java Charset from this object.