org.apache.commons.lang3

## Class CharEncoding

- java.lang.Object
- - org.apache.commons.lang3.CharEncoding

-     public class CharEncoding
      extends Object

  Character encoding names required of every implementation of the Java platform.

  According to JRE character encoding names:

  Every implementation of the Java platform is required to support the following character encodings. Consult the release documentation for your implementation to see if any other encodings are supported.

  Since:
    2.1
  Version:
    $Id: CharEncoding.java 1459653 2013-03-22 07:37:03Z bayard $
  See Also:
    JRE character encoding names

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ISO_8859_1` ISO Latin Alphabet #1, also known as ISO-LATIN-1.
    `static String` | `US_ASCII` Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.
    `static String` | `UTF_16` Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order accepted on input, big-endian used on output).
    `static String` | `UTF_16BE` Sixteen-bit Unicode Transformation Format, big-endian byte order.
    `static String` | `UTF_16LE` Sixteen-bit Unicode Transformation Format, little-endian byte order.
    `static String` | `UTF_8` Eight-bit Unicode Transformation Format.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CharEncoding()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isSupported(String name)` Returns whether the named charset is supported.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ISO_8859_1

          public static final String ISO_8859_1

      ISO Latin Alphabet #1, also known as ISO-LATIN-1.

      Every implementation of the Java platform is required to support this character encoding.

      See Also:
        Constant Field Values

    - #### US_ASCII

          public static final String US_ASCII

      Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.

      Every implementation of the Java platform is required to support this character encoding.

      See Also:
        Constant Field Values

    - #### UTF_16

          public static final String UTF_16

      Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order accepted on input, big-endian used on output).

      Every implementation of the Java platform is required to support this character encoding.

      See Also:
        Constant Field Values

    - #### UTF_16BE

          public static final String UTF_16BE

      Sixteen-bit Unicode Transformation Format, big-endian byte order.

      Every implementation of the Java platform is required to support this character encoding.

      See Also:
        Constant Field Values

    - #### UTF_16LE

          public static final String UTF_16LE

      Sixteen-bit Unicode Transformation Format, little-endian byte order.

      Every implementation of the Java platform is required to support this character encoding.

      See Also:
        Constant Field Values

    - #### UTF_8

          public static final String UTF_8

      Eight-bit Unicode Transformation Format.

      Every implementation of the Java platform is required to support this character encoding.

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CharEncoding

          public CharEncoding()

  - ### Method Detail

    - #### isSupported

          public static boolean isSupported(String name)

      Returns whether the named charset is supported.

      This is similar to java.nio.charset.Charset.isSupported(String) but handles more formats

      Parameters:
        `name` - the name of the requested charset; may be either a canonical name or an alias, null returns false
      Returns:
        `true` if the charset is available in the current Java virtual machine

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.