com.beaglebuddy.id3.enums.v22

## Enum Encoding

- java.lang.Object
- - java.lang.Enum<Encoding>
  - - com.beaglebuddy.id3.enums.v22.Encoding

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Encoding>

      public enum Encoding
      extends java.lang.Enum<Encoding>

  A character set encoding indicates how to interpret bytes when constructing or displaying a String. A list of standard character sets can be found at IANA Character sets. The ID3v2.2 specification allows only two of these encodings to be used. For more information about character set encodings, see the javadocs for the java.nio.charset.Charset class.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ISO_8859_1` standard ascii character set
    `UTF_16` 2 byte unicode character set

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.nio.charset.Charset` | `getCharacterSet()` gets the character set implementing the encoding.
    `java.lang.String` | `getName()` gets the name of the encoding.
    `int` | `getNumBytesInNullTerminator()` gets number of bytes the encoding uses to represent a null terminator character.
    `java.lang.String` | `toString()` gets a string representation of the encoding enum.
    `static Encoding` | `valueOf(byte encoding)` convert an integral value to its corresponding ID3v2.2 encoding enum.
    `static Encoding` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static Encoding[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ISO_8859_1

          public static final Encoding ISO_8859_1

      standard ascii character set

    - #### UTF_16

          public static final Encoding UTF_16

      2 byte unicode character set

  - ### Method Detail

    - #### values

          public static Encoding[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Encoding c : Encoding.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Encoding valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getName

          public java.lang.String getName()

      gets the name of the encoding.
      Returns:
        the name of the encoding.

    - #### getCharacterSet

          public java.nio.charset.Charset getCharacterSet()

      gets the character set implementing the encoding.
      Returns:
        the character set implementing the encoding.

    - #### getNumBytesInNullTerminator

          public int getNumBytesInNullTerminator()

      gets number of bytes the encoding uses to represent a null terminator character.
      Returns:
        the number of bytes the encoding uses to represent a null terminator character.

    - #### valueOf

          public static Encoding valueOf(byte encoding)
                                  throws java.lang.IllegalArgumentException

      convert an integral value to its corresponding ID3v2.2 encoding enum.
      Parameters:
        `encoding` - integral value to be converted to an ID3v2.2 Encoding enum.
      Returns:
        the ID3v2.2 Encoding enum corresponding to the integral value.
      Throws:
        `java.lang.IllegalArgumentException` - if the integral value does not correspond to a valid ID3v2.2 Encoding.

    - #### toString

          public java.lang.String toString()

      gets a string representation of the encoding enum.
      Overrides:
        `toString` in class `java.lang.Enum<Encoding>`
      Returns:
        a string representation of the encoding enum.