Class Charsets


  • public class Charsets
    extends Object
    Author:
    ehugonnet
    • Field Detail

      • US_ASCII

        public static final Charset US_ASCII
        US-ASCII: seven-bit ASCII.
      • ISO_8859_1

        public static final Charset ISO_8859_1
        ISO-8859-1 : ISO-LATIN-1.
      • UTF_8

        public static final Charset UTF_8
        UTF-8.
      • UTF_16BE

        public static final Charset UTF_16BE
        UTF-16BE: UTF-16 big-endian byte order.
      • UTF_16LE

        public static final Charset UTF_16LE
        UTF-16LE: UTF-16 little-endian byte order.
      • UTF_16

        public static final Charset UTF_16
        UTF-16: UTF-16 byte order identified by an optional byte-order mark.
      • IBM437

        public static final Charset IBM437
        IBM437.
    • Method Detail

      • toCharset

        public static Charset toCharset​(String charset)
        Returns a Charset for the named charset. If the name is null, return the default Charset. The UnsupportedCharsetException runtime exception is thrown if the specified charset doesn't exist or is not supported by Java.
        Parameters:
        charset - The name of the requested charset, may be null.
        Returns:
        a Charset for the named charset