com.beaglebuddy.ape

## Class APEFooter

- java.lang.Object
- - com.beaglebuddy.ape.APEFooter

- Direct Known Subclasses:
    APEHeader

      public class APEFooter
      extends java.lang.Object

  This class provides methods for reading the APE footer in an `APE tag`. The APE tag footer is found in both APEv1 and APEv2 tags. It is 32 bytes long.

  See Also:
    APEv1 Specification, APEv2 Specification

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `SIZE` size (in bytes) of an APE header/footer

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `APEFooter(byte[] bytes)` constructor.
    `APEFooter(byte[] bytes, java.lang.String type)` constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `APEFlags` | `getFlags()` gets the flags associated with the APE tag.
    `int` | `getNumItems()` gets the number of items in the APE tag.
    `int` | `getSize()` gets the size of the APE footer.
    `int` | `getTagSize()` gets the size of the APE tag, including the footer, but not the header.
    `int` | `getVersion()` gets the version of the APE tag.
    `java.lang.String` | `toString()` gets a string representation of the APE footer.
    `protected java.lang.String` | `toString(java.lang.String type)` gets a string representation of the APE footer/header.

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

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

- - ### Field Detail

    - #### SIZE

          public static final int SIZE

      size (in bytes) of an APE header/footer
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### APEFooter

          public APEFooter(byte[] bytes)
                    throws ParseException

      constructor.
      Parameters:
        `bytes` - bytes from an APE tag.
      Throws:
        `ParseException` - if the bytes do not contain a valid APE footer.

    - #### APEFooter

          public APEFooter(byte[] bytes,
                   java.lang.String type)
                    throws ParseException

      constructor.
      Parameters:
        `bytes` - bytes from an APE tag.
        `type` - whether this is an APE header or a footer.
      Throws:
        `ParseException` - if the bytes do not contain a valid APE footer.

  - ### Method Detail

    - #### getSize

          public int getSize()

      gets the size of the APE footer.
      Returns:
        the size of the APE footer.

    - #### getVersion

          public int getVersion()

      gets the version of the APE tag.
      Returns:
        the version of the APE tag.

    - #### getTagSize

          public int getTagSize()

      gets the size of the APE tag, including the footer, but not the header.
      Returns:
        the size of the APE tag, including the footer, but not the header.

    - #### getNumItems

          public int getNumItems()

      gets the number of items in the APE tag.
      Returns:
        the number of items in the APE tag.

    - #### getFlags

          public APEFlags getFlags()

      gets the flags associated with the APE tag.
      Returns:
        the flags associated with the APE tag.

    - #### toString

          public java.lang.String toString()

      gets a string representation of the APE footer.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of the APE footer.

    - #### toString

          protected java.lang.String toString(java.lang.String type)

      gets a string representation of the APE footer/header.
      Parameters:
        `type` - whether this is an APE header or footer.
      Returns:
        a string representation of the APE footer.