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

Variable Index

 o DO_COMPRESS
 o ID_INVALID
 o IS_COMPRESSED
 o NO_COMPRESSION
Public contants

Constructor Index

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

Method Index

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

Variables

 o NO_COMPRESSION
 public static final byte NO_COMPRESSION
Public contants

 o IS_COMPRESSED
 public static final byte IS_COMPRESSED
 o DO_COMPRESS
 public static final byte DO_COMPRESS
 o ID_INVALID
 public static final String ID_INVALID

Constructors

 o 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
 o 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

Methods

 o getID
 public String getID()
Public methods

 o setID
 public void setID(String id)
 o getTagAlterPreservation
 public boolean getTagAlterPreservation()
 o setTagAlterPreservation
 public void setTagAlterPreservation(boolean tag_alter_preservation)
 o getFileAlterPreservation
 public boolean getFileAlterPreservation()
 o setFileAlterPreservation
 public void setFileAlterPreservation(boolean file_alter_preservation)
 o getReadOnly
 public boolean getReadOnly()
 o setReadOnly
 public void setReadOnly(boolean read_only)
 o getCompression
 public boolean getCompression()
 o setCompression
 public void setCompression(boolean compression)
 o getEncryptionID
 public byte getEncryptionID()
Returns:
s Encrytion ID or 0 if not encrypted
 o setEncryption
 public void setEncryption(byte encryption_id)
 o getGroup
 public byte getGroup()
 o setGroup
 public void setGroup(byte group)
 o getLength
 public int getLength()
Calculates the number of bytes necessary to store a byte representation of this frame

 o getContent
 public byte[] getContent()
Returns content (decompressed)

 o getBytes
 public byte[] getBytes()
Returns an array of bytes representing this frame


All Packages  Class Hierarchy  This Package  Previous  Next  Index