# Class Charset

java.lang.Object
java.nio.charset.Charset

All Implemented Interfaces:
  `Comparable<Charset>`

public class Charset extends Object implements Comparable<Charset>
Added this for Kotlin

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Charset(String canonicalName, String[] aliases)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(Charset another)`
  Compares this object to the specified object to determine their relative order.
  `String`
  `displayName()`
  `static Charset`
  `forName(String name)`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### Charset

    protected Charset(String canonicalName, String[] aliases)

- ## Method Details

  - ### compareTo

    public int compareTo(Charset another)
    Description copied from interface: `Comparable`

    Compares this object to the specified object to determine their relative order.

    ###### Parameters

    - `another`: the object to compare to this instance.

    ###### Returns

    Specified by:
      `compareTo` in interface `Comparable<Charset>`
    Returns:

      a negative integer if this instance is less than `another`; a positive integer if this instance is greater than `another`; 0 if this instance has the same order as `another`.

      ###### Throws

      - `ClassCastException`: @throws ClassCastException if `another` cannot be converted into something comparable to `this` instance.

  - ### displayName

    public String displayName()

  - ### forName

    public static Charset forName(String name)