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 ID3v2ExtendedHeader

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

public class ID3v2ExtendedHeader
extends java.lang.Object

Constructor Summary
`ID3v2ExtendedHeader(java.io.File mp3)` Create an extended header object from the file passed.

Method Summary
`byte[]` | `getBytes()` Return an array of bytes representing this extended header in the standard format to be written to a file.
`byte[]` | `getCRC()` If there is crc data in the extended header, then the attached 5 byte crc will be returned.
`boolean` | `getCRCed()` Returns true if CRC information is provided for this tag
`boolean` | `getImageEncode()` Returns true if the image encode flag is set
`int` | `getImageRestriction()` Returns the value of the image restriction field or -1 if not set
`int` | `getMaxFrames()` Returns the maximum number of frames if set.
`int` | `getMaxTagSize()` Returns the maximum tag size or -1 if unset
`int` | `getMaxTextSize()` Returns the maximum length of a string if set or -1
`int` | `getNumFlagBytes()` Returns the number of extended flag bytes
`int` | `getSize()` Returns the size of the extended header
`boolean` | `getTextEncode()` Returns true if the text encode flag is set
`boolean` | `getUpdate()` Returns true if this tag is an update of a previous tag
`java.lang.String` | `toString()` Returns a string representation of this object that contains all information within.

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

Constructor Detail

### ID3v2ExtendedHeader

    public ID3v2ExtendedHeader(java.io.File mp3)
                        throws java.io.FileNotFoundException,
                               java.io.IOException,
                               ID3v2FormatException

  Create an extended header object from the file passed. Information in the file's extended header will be read and stored.

Parameters:
  `mp3` - the file to read/write to
Throws:
  `java.io.FileNotFoundException` - if an error occurs
  `java.io.IOException` - if an error occurs
  `ID3v2FormatException` - if an error occurs

Method Detail

### getBytes

    public byte[] getBytes()

  Return an array of bytes representing this extended header in the standard format to be written to a file.

  Returns:
    a binary represenation of this extended header

### getSize

    public int getSize()

  Returns the size of the extended header

  Returns:
    the size of the extended header

### getNumFlagBytes

    public int getNumFlagBytes()

  Returns the number of extended flag bytes

  Returns:
    the number of extended flag bytes

### getMaxFrames

    public int getMaxFrames()

  Returns the maximum number of frames if set. If unset, returns -1

  Returns:
    the maximum number of frames or -1 if unset

### getMaxTagSize

    public int getMaxTagSize()

  Returns the maximum tag size or -1 if unset

  Returns:
    the maximum tag size or -1 if unset

### getTextEncode

    public boolean getTextEncode()

  Returns true if the text encode flag is set

  Returns:
    true if the text encode flag is set

### getMaxTextSize

    public int getMaxTextSize()

  Returns the maximum length of a string if set or -1

  Returns:
    the maximum length of a string if set or -1

### getImageEncode

    public boolean getImageEncode()

  Returns true if the image encode flag is set

  Returns:
    true if the image encode flag is set

### getImageRestriction

    public int getImageRestriction()

  Returns the value of the image restriction field or -1 if not set

  Returns:
    the value of the image restriction field or -1 if not set

### getUpdate

    public boolean getUpdate()

  Returns true if this tag is an update of a previous tag

  Returns:
    true if this tag is an update of a previous tag

### getCRCed

    public boolean getCRCed()

  Returns true if CRC information is provided for this tag

  Returns:
    true if CRC information is provided for this tag

### getCRC

    public byte[] getCRC()

  If there is crc data in the extended header, then the attached 5 byte crc will be returned. An empty array will be returned if this has not been set.

  Returns:
    the attached crc data if there is any

### toString

    public java.lang.String toString()

  Returns a string representation of this object that contains all information 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