Class Charsets


  • public class Charsets
    extends java.lang.Object
    Helps dealing with Charsets.
    Since:
    3.3
    • Constructor Summary

      Constructors 
      Constructor Description
      Charsets()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.charset.Charset toCharset​(java.lang.String charsetName)
      Returns a charset object for the given charset name.
      static java.nio.charset.Charset toCharset​(java.lang.String charsetName, java.lang.String defaultCharsetName)
      Returns a charset object for the given charset name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Charsets

        public Charsets()
    • Method Detail

      • toCharset

        public static java.nio.charset.Charset toCharset​(java.lang.String charsetName)
        Returns a charset object for the given charset name.
        Parameters:
        charsetName - The name of the requested charset; may be a canonical name, an alias, or null. If null, return the default charset.
        Returns:
        A charset object for the named charset
      • toCharset

        public static java.nio.charset.Charset toCharset​(java.lang.String charsetName,
                                                         java.lang.String defaultCharsetName)
        Returns a charset object for the given charset name.
        Parameters:
        charsetName - The name of the requested charset; may be a canonical name, an alias, or null. If null, return the default charset.
        defaultCharsetName - the charset name to use if the requested charset is null
        Returns:
        A charset object for the named charset