    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class de.vdheide.mp3.ID3v2ExtendedHeader

    java.lang.Object
       |
       +----de.vdheide.mp3.ID3v2ExtendedHeader

public class ID3v2ExtendedHeader
extends Object

##

ID3v2ExtendedHeader()
  Creates an extended header with preferences
ID3v2ExtendedHeader(boolean, int, int)
  Creates an extended header
ID3v2ExtendedHeader(InputStream)
  Creates an extended header from a stream.

##

getBytes()
  Returns an array of bytes representing this extended header.
getCRC()
getPaddingSize()
getSize()
hasCRC()
setCRC(int)
  Set CRC.
setHasCRC(boolean)
  Set if CRC is used
setPaddingSize(int)
  Set size of padding

##

ID3v2ExtendedHeader

     public ID3v2ExtendedHeader()

  Creates an extended header with preferences

  Parameters:
    s - head Header an array of bytes

ID3v2ExtendedHeader

     public ID3v2ExtendedHeader(boolean use_crc,
                                int crc,
                                int padding_size)

  Creates an extended header

  Parameters:
    use_crc - Use CRC?
    crc - CRC of frames (will be set to 0 if `use_crc` == false)
    padding_size - Size of padding

ID3v2ExtendedHeader

     public ID3v2ExtendedHeader(InputStream in) throws IOException

  Creates an extended header from a stream. Stream must be positioned to the first byte of the extended header.

  Parameters:
    in - Stream to read from
    use_unsynch - If true, unsynchronization is used
  Throws: IOException
    If an I/O error occurs

##

getSize

     public int getSize()

  Returns:
    Size of extended header

getPaddingSize

     public int getPaddingSize()

  Returns:
    Size of padding

setPaddingSize

     public void setPaddingSize(int size)

  Set size of padding

  Parameters:
    size - Size of padding

hasCRC

     public boolean hasCRC()

  Returns:
    true if CRC is used

setHasCRC

     public void setHasCRC(boolean act)

  Set if CRC is used

  Parameters:
    crc - True: CRC is used

getCRC

     public long getCRC()

  Returns:
    CRC stored in extended header

setCRC

     public void setCRC(int crc)

  Set CRC. This automatically sets `hasCRC` to return `true`.

  Parameters:
    crc - CRC to set

getBytes

     public byte[] getBytes()

  Returns an array of bytes representing this extended header.

  Note: This is not unsynchronized!

  Returns:
    Extended header as bytes, ready to write

    All Packages  Class Hierarchy  This Package  Previous  Next  Index