org.farng.mp3.id3
Class ID3v2_3Frame

java.lang.Object
  extended byorg.farng.mp3.AbstractMP3FileItem
      extended byorg.farng.mp3.AbstractMP3Fragment
          extended byorg.farng.mp3.id3.AbstractID3v2Frame
              extended byorg.farng.mp3.id3.ID3v2_2Frame
                  extended byorg.farng.mp3.id3.ID3v2_3Frame
Direct Known Subclasses:
ID3v2_4Frame

public class ID3v2_3Frame
extends ID3v2_2Frame

The extended header contains information that is not vital to the correct parsing of the tag information, hence the extended header is optional.

Extended header size $xx xx xx xx
Extended Flags$xx xx
Size of padding$xx xx xx xx

Where the 'Extended header size', currently 6 or 10 bytes, excludes itself. The 'Size of padding' is simply the total tag size excluding the frames and the headers, in other words the padding. The extended header is considered separate from the header proper, and as such is subject to unsynchronisation.

The extended flags are a secondary flag set which describes further attributes of the tag. These attributes are currently defined as follows

%x0000000 00000000

x - CRC data present

If this flag is set four bytes of CRC-32 data is appended to the extended header. The CRC should be calculated before unsynchronisation on the data between the extended header and the padding, i.e. the frames and only the frames.

Total frame CRC $xx xx xx xx

Version:
$Revision: 1.7 $
Author:
Eric Farng

Field Summary
protected  boolean compression
           
protected  boolean encryption
           
protected  boolean fileAlterPreservation
           
protected  boolean groupingIdentity
           
protected  boolean readOnly
           
protected  boolean tagAlterPreservation
           
 
Constructor Summary
ID3v2_3Frame()
          Creates a new ID3v2_3Frame object.
ID3v2_3Frame(AbstractID3v2Frame frame)
          Creates a new ID3v2_4Frame object.
ID3v2_3Frame(AbstractID3v2FrameBody body)
          Creates a new ID3v2_3Frame object.
ID3v2_3Frame(boolean readOnly, boolean groupingIdentity, boolean compression, boolean encryption, AbstractID3v2FrameBody body)
          Creates a new ID3v2_3Frame object.
ID3v2_3Frame(ID3v2_3Frame copyObject)
          Creates a new ID3v2_3Frame object.
ID3v2_3Frame(java.io.RandomAccessFile file)
          Creates a new ID3v2_3Frame object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this object and its body equals the argument and its body.
 int getSize()
           
 void read(java.io.RandomAccessFile file)
          import java.io.IOException; import java.io.RandomAccessFile; read from current file pointer position.
protected  void setAlterPreservation()
           
 void write(java.io.RandomAccessFile file)
          Method to write this object to the file argument at is current file pointer position.
 
Methods inherited from class org.farng.mp3.id3.AbstractID3v2Frame
getIdentifier, isValidID3v2FrameIdentifier, readBody, toString
 
Methods inherited from class org.farng.mp3.AbstractMP3Fragment
getBody, isSubsetOf, setBody
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

compression

protected boolean compression

encryption

protected boolean encryption

fileAlterPreservation

protected boolean fileAlterPreservation

groupingIdentity

protected boolean groupingIdentity

readOnly

protected boolean readOnly

tagAlterPreservation

protected boolean tagAlterPreservation
Constructor Detail

ID3v2_3Frame

public ID3v2_3Frame()
Creates a new ID3v2_3Frame object.


ID3v2_3Frame

public ID3v2_3Frame(AbstractID3v2FrameBody body)
Creates a new ID3v2_3Frame object.


ID3v2_3Frame

public ID3v2_3Frame(ID3v2_3Frame copyObject)
Creates a new ID3v2_3Frame object.


ID3v2_3Frame

public ID3v2_3Frame(boolean readOnly,
                    boolean groupingIdentity,
                    boolean compression,
                    boolean encryption,
                    AbstractID3v2FrameBody body)
Creates a new ID3v2_3Frame object.


ID3v2_3Frame

public ID3v2_3Frame(AbstractID3v2Frame frame)
Creates a new ID3v2_4Frame object.


ID3v2_3Frame

public ID3v2_3Frame(java.io.RandomAccessFile file)
             throws java.io.IOException,
                    InvalidTagException
Creates a new ID3v2_3Frame object.

Method Detail

getSize

public int getSize()
Overrides:
getSize in class ID3v2_2Frame

equals

public boolean equals(java.lang.Object obj)
Description copied from class: AbstractMP3Fragment
Returns true if this object and its body equals the argument and its body. this object is equal if and only if they are the same class and have the same getIdentifier id string.

Overrides:
equals in class AbstractMP3Fragment
Parameters:
obj - object to determine equality of
Returns:
true if this object and its body equals the argument and its body.

read

public void read(java.io.RandomAccessFile file)
          throws java.io.IOException,
                 InvalidTagException
Description copied from class: AbstractMP3FileItem
import java.io.IOException; import java.io.RandomAccessFile; read from current file pointer position.

Overrides:
read in class ID3v2_2Frame
Throws:
java.io.IOException
InvalidTagException

write

public void write(java.io.RandomAccessFile file)
           throws java.io.IOException
Description copied from class: AbstractMP3FileItem
Method to write this object to the file argument at is current file pointer position.

Overrides:
write in class ID3v2_2Frame
Throws:
java.io.IOException

setAlterPreservation

protected void setAlterPreservation()


Copyright (c) 2004 Eric Farng