Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## helliker.id3
Class ID3v2Footer

    java.lang.Object
      |
      +--helliker.id3.ID3v2Footer

public class ID3v2Footer
extends java.lang.Object

Constructor Summary
`ID3v2Footer(java.io.File mp3, int location)` Creates and id3v2 footer.

Method Summary
`boolean` | `footerExists()` Returns true if a footer exists
`byte[]` | `getBytes()` Return an array of bytes representing the footer.
`boolean` | `getExperimental()` Returns true if the experimental bit of this footer is set.
`boolean` | `getExtendedFooter()` Returns true if this tag has an extended footer.
`boolean` | `getFooter()` Returns true if this tag has a footer.
`int` | `getFooterSize()` Returns the size (in bytes) of this footer.
`int` | `getMajorVersion()` Returns the major version of this id3v2 tag.
`int` | `getMinorVersion()` Return the minor version/revision of this id3v2 tag.
`int` | `getTagSize()` Returns the size (in bytes) of the frames and/or extended footer portion of the id3v2 tag according to the size field in the footer.
`boolean` | `getUnsynchronisation()` Returns true if the unsynchronisation bit is set in this footer.
`void` | `setExperimental(boolean experiment)` Set the value of the experimental bit of this footer.
`void` | `setExtendedFooter(boolean extend)` Set the value of the extended footer bit of this footer.
`void` | `setFooter(boolean foot)` Sets the value of the footer bit for this footer.
`void` | `setTagSize(int size)` Sets the size of the frames and/or extended footer.
`void` | `setUnsynchronisation(boolean unsynch)` Set the unsynchronisation flag for this footer.
`java.lang.String` | `toString()` Return a string representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ID3v2Footer

    public ID3v2Footer(java.io.File mp3,
                       int location)
                throws java.io.FileNotFoundException,
                       java.io.IOException

  Creates and id3v2 footer. This is almost identical to an id3v2 header but is placed at the end of the tag and is optional. It should only be used when tags are appended. An attempt will be made to read from the file provided from the location provided.

Parameters:
  `mp3` - the file to read from
  `location` - the location to find the footer
Throws:
  `java.io.FileNotFoundException` - if an error occurs
  `java.io.IOException` - if an error occurs

Method Detail

### getBytes

    public byte[] getBytes()

  Return an array of bytes representing the footer. This can be used to easily write the footer to a file.

  Returns:
    a binary representation of this footer

### footerExists

    public boolean footerExists()

  Returns true if a footer exists

  Returns:
    true if a footer exists

### getFooterSize

    public int getFooterSize()

  Returns the size (in bytes) of this footer. This is always 10.

  Returns:
    the size of this footer

### getTagSize

    public int getTagSize()

  Returns the size (in bytes) of the frames and/or extended footer portion of the id3v2 tag according to the size field in the footer.

  Returns:
    the size field of the footer

### setTagSize

    public void setTagSize(int size)

  Sets the size of the frames and/or extended footer. If this function is called, the footerExists function will return true. This is called every time a frame is updated, added, or removed.

  Parameters:
    `size` - a value of type 'int'

### getMajorVersion

    public int getMajorVersion()

  Returns the major version of this id3v2 tag.

  Returns:
    the major version of this id3v2 tag.

### getMinorVersion

    public int getMinorVersion()

  Return the minor version/revision of this id3v2 tag.

  Returns:
    the minor version/revision of this id3v2 tag.

### getUnsynchronisation

    public boolean getUnsynchronisation()

  Returns true if the unsynchronisation bit is set in this footer.

  Returns:
    true if the unsynchronisation bit is set in this footer.

### setUnsynchronisation

    public void setUnsynchronisation(boolean unsynch)

  Set the unsynchronisation flag for this footer.

  Parameters:
    `unsynch` - the new value of the unsynchronisation flag

### getExtendedFooter

    public boolean getExtendedFooter()

  Returns true if this tag has an extended footer.

  Returns:
    true if this tag has an extended footer

### setExtendedFooter

    public void setExtendedFooter(boolean extend)

  Set the value of the extended footer bit of this footer.

  Parameters:
    `extend` - the new value of the extended footer bit

### getExperimental

    public boolean getExperimental()

  Returns true if the experimental bit of this footer is set.

  Returns:
    true if the experimental bit of this footer is set

### setExperimental

    public void setExperimental(boolean experiment)

  Set the value of the experimental bit of this footer.

  Parameters:
    `experiment` - the new value of the experimental bit

### getFooter

    public boolean getFooter()

  Returns true if this tag has a footer.

  Returns:
    true if this tag has a footer

### setFooter

    public void setFooter(boolean foot)

  Sets the value of the footer bit for this footer.

  Parameters:
    `foot` - the new value of the footer bit for this footer

### toString

    public java.lang.String toString()

  Return a string representation of this object. Contains all information contained within.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of this object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD