com.beaglebuddy.id3.enums

## Enum ID3TagVersion

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

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

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

  The ID3v2.x tag versions available in .mp3 files.

- - ### Enum Constant Summary

    Enum Constants
    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.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `NUM_ID_BYTES` The number of bytes which identifies an ID3v2.x tag.

  - ### Method Summary

    Methods
    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.

    - ### 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

    - #### NONE

          public static final ID3TagVersion NONE

      The .mp3 file does not contain an ID3v2.x tag.

    - #### ID3V2_2

          public static final ID3TagVersion ID3V2_2

      The .mp3 file contains an ID3v2.2 tag.

    - #### ID3V2_3

          public static final ID3TagVersion ID3V2_3

      The .mp3 file contains an ID3v2.3 tag.

    - #### ID3V2_4

          public static final ID3TagVersion ID3V2_4

      The .mp3 file contains an ID3v2.4 tag.

    - #### ID3V2_4_FOOTER

          public static final ID3TagVersion ID3V2_4_FOOTER

      The .mp3 file contains an ID3v2.4 footer.

  - ### Field Detail

    - #### NUM_ID_BYTES

          public static final int NUM_ID_BYTES

      The number of bytes which identifies an ID3v2.x tag.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### values

          public static ID3TagVersion[] 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 (ID3TagVersion c : ID3TagVersion.values())
              System.out.println(c);

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

    - #### valueOf

          public static ID3TagVersion 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

    - #### readVersion

          public static ID3TagVersion readVersion(java.io.InputStream inputStream)
                                           throws java.io.IOException

      read in the ID3v2.x id bytes from the mp3 file and see if an ID3v2.x header has been found.
      Parameters:
        `inputStream` - input stream pointing to the beginning of an ID3v2.x header in an mp3 file.
      Returns:
        the version of the ID3v2.x tag found in the mp3 file, including none, if no tag is found.
      Throws:
        `java.io.IOException` - if the version bytes can not be read from the input stream.

    - #### getDescription

          public java.lang.String getDescription()

      gets description of the ID3v2.x version.
      Returns:
        description of the ID3v2.x version.

    - #### getIdBytes

          public byte[] getIdBytes()

      gets the bytes which uniquely identify the version of an ID3v2.x tag.
      Returns:
        the bytes which uniquely identify the version of an ID3v2.x tag.

    - #### getVersion

          public static final ID3TagVersion getVersion(byte[] idBytes)

      determines if the specified id bytes are valid ID3v2.x id bytes, and if so, which version they represent.
      Parameters:
        `idBytes` - id bytes from an .mp3 tag.
      Returns:
        the ID3v2.x tag version, or NONE, if the id bytes do not contain a valid ID3v2.x tag id.

    - #### toString

          public java.lang.String toString()

      gets a string representation of the ID3v2.x version.
      Overrides:
        `toString` in class `java.lang.Enum<ID3TagVersion>`
      Returns:
        a string representation of the ID32.x version.