    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class de.vdheide.mp3.ID3v2Frame

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

public class ID3v2Frame
extends Object

##

DO_COMPRESS
ID_INVALID
IS_COMPRESSED
NO_COMPRESSION
  Public contants

##

ID3v2Frame(InputStream)
  Creates a new ID3v2 frame from a stream.
ID3v2Frame(String, byte[], boolean, boolean, boolean, byte, byte, byte)
  Creates a new ID3v2 frame

##

getBytes()
  Returns an array of bytes representing this frame
getCompression()
getContent()
  Returns content (decompressed)
getEncryptionID()
getFileAlterPreservation()
getGroup()
getID()
  Public methods
getLength()
  Calculates the number of bytes necessary to store a byte representation of this frame
getReadOnly()
getTagAlterPreservation()
setCompression(boolean)
setEncryption(byte)
setFileAlterPreservation(boolean)
setGroup(byte)
setID(String)
setReadOnly(boolean)
setTagAlterPreservation(boolean)

##

NO_COMPRESSION

     public static final byte NO_COMPRESSION

  Public contants

IS_COMPRESSED

     public static final byte IS_COMPRESSED

DO_COMPRESS

     public static final byte DO_COMPRESS

ID_INVALID

     public static final String ID_INVALID

##

ID3v2Frame

     public ID3v2Frame(String id,
                       byte content[],
                       boolean tag_alter_preservation,
                       boolean file_alter_preservation,
                       boolean read_only,
                       byte compression_type,
                       byte encryption_id,
                       byte group) throws ID3v2DecompressionException

  Creates a new ID3v2 frame

  Parameters:
    id - Frame id
    content - Frame content. Must not be unsynchronized!
    tag_alter_preservation - True if frame should be discarded if frame id is unknown to software and tag is altered
    file_alter_preservation - Same as `tag_alter_preservation`, but applies if file (excluding tag) is altered
    read_only - True if frame should not be changed
    compression_type - Use contant from this class: `ID3v2Frame.NO_COMPRESSION`: `content` is not compressed and should not be compressed. `ID3v2Frame.IS_COMPRESSED`: `content` is already compressed `ID3v2Frame.DO_COMPRESS`: `content` is not compressed, but should be Compression can also be switched on/off with `setCompression`
    encryption - Encryption method or 0 if not encrypted (not completely supported, encryption must be done externally)
    group - Group of frames this frame belongs to or 0 if frame does not belong to any group
  Throws: ID3v2DecompressionException
    If content is compressed and decompresson fails

ID3v2Frame

     public ID3v2Frame(InputStream in) throws IOException, ID3v2DecompressionException

  Creates a new ID3v2 frame from a stream. Stream position must be set to first byte of frame. Note: Encryption/Deencryption is not supported, so content of encrypted frames will be returned encrypted. It is up to the higher level routines to decompress it. Note^2: Compression/decompression supports only GZIP.

  Parameters:
    in - Stream to read from
  Throws: ID3v2DecompressionException
    If input is compressed and decompression fails
  Throws: IOException
    If I/O error occurs

##

getID

     public String getID()

  Public methods

setID

     public void setID(String id)

getTagAlterPreservation

     public boolean getTagAlterPreservation()

setTagAlterPreservation

     public void setTagAlterPreservation(boolean tag_alter_preservation)

getFileAlterPreservation

     public boolean getFileAlterPreservation()

setFileAlterPreservation

     public void setFileAlterPreservation(boolean file_alter_preservation)

getReadOnly

     public boolean getReadOnly()

setReadOnly

     public void setReadOnly(boolean read_only)

getCompression

     public boolean getCompression()

setCompression

     public void setCompression(boolean compression)

getEncryptionID

     public byte getEncryptionID()

  Returns:
    s Encrytion ID or 0 if not encrypted

setEncryption

     public void setEncryption(byte encryption_id)

getGroup

     public byte getGroup()

setGroup

     public void setGroup(byte group)

getLength

     public int getLength()

  Calculates the number of bytes necessary to store a byte representation of this frame

getContent

     public byte[] getContent()

  Returns content (decompressed)

getBytes

     public byte[] getBytes()

  Returns an array of bytes representing this frame

    All Packages  Class Hierarchy  This Package  Previous  Next  Index