public enum Encoding extends java.lang.Enum<Encoding>
Enum Constant and Description |
---|
ISO_8859_1
standard ascii character set
|
UTF_16
2 byte unicode character set
|
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 the 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.3 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.
|
public static final Encoding ISO_8859_1
public static final Encoding UTF_16
public static Encoding[] values()
for (Encoding c : Encoding.values()) System.out.println(c);
public static Encoding valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getName()
public java.nio.charset.Charset getCharacterSet()
public int getNumBytesInNullTerminator()
public static Encoding valueOf(byte encoding) throws java.lang.IllegalArgumentException
encoding
- integral value to be converted to an ID3v2.3 Encoding enum.java.lang.IllegalArgumentException
- if the integral value does not correspond to a valid ID3v2.3 Encoding.public java.lang.String toString()
toString
in class java.lang.Enum<Encoding>