public enum ID3TagVersion extends java.lang.Enum<ID3TagVersion>
Enum Constant and Description |
---|
ID3V2_2
The .mp3 file contains an ID3v2.2 tag.
|
ID3V2_3
The .mp3 file contains an ID3v2.3 tag.
|
ID3V2_4
The .mp3 file contains an ID3v2.4 tag.
|
ID3V2_4_FOOTER
The .mp3 file contains an ID3v2.4 footer.
|
NONE
The .mp3 file does not contain an ID3v2.x tag.
|
Modifier and Type | Field and Description |
---|---|
static int |
NUM_ID_BYTES
The number of bytes which identifies an ID3v2.x tag.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
gets description of the ID3v2.x version.
|
byte[] |
getIdBytes()
gets the bytes which uniquely identify the version of an ID3v2.x tag.
|
static ID3TagVersion |
getVersion(byte[] idBytes)
determines if the specified id bytes are valid ID3v2.x id bytes, and if so, which version they represent.
|
static ID3TagVersion |
readVersion(java.io.InputStream inputStream)
read in the ID3v2.x id bytes from the mp3 file and see if an ID3v2.x header has been found.
|
java.lang.String |
toString()
gets a string representation of the ID3v2.x version.
|
static ID3TagVersion |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ID3TagVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ID3TagVersion NONE
public static final ID3TagVersion ID3V2_2
public static final ID3TagVersion ID3V2_3
public static final ID3TagVersion ID3V2_4
public static final ID3TagVersion ID3V2_4_FOOTER
public static final int NUM_ID_BYTES
public static ID3TagVersion[] values()
for (ID3TagVersion c : ID3TagVersion.values()) System.out.println(c);
public static ID3TagVersion 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 static ID3TagVersion readVersion(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- input stream pointing to the beginning of an ID3v2.x header in an mp3 file.java.io.IOException
- if the version bytes can not be read from the input stream.public java.lang.String getDescription()
public byte[] getIdBytes()
public static final ID3TagVersion getVersion(byte[] idBytes)
idBytes
- id bytes from an .mp3 tag.public java.lang.String toString()
toString
in class java.lang.Enum<ID3TagVersion>