org.farng.mp3.id3
Class AbstractID3v2FrameBody

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
      extended by org.farng.mp3.AbstractMP3FragmentBody
          extended by org.farng.mp3.id3.AbstractID3v2FrameBody
All Implemented Interfaces:
MP3MetadataContainer
Direct Known Subclasses:
AbstractFrameBodyTextInformation, AbstractFrameBodyUrlLink, AbstractPictureFrameBody, FrameBodyAENC, FrameBodyASPI, FrameBodyCOMM, FrameBodyCOMR, FrameBodyCRM, FrameBodyENCR, FrameBodyEQU2, FrameBodyEQUA, FrameBodyETCO, FrameBodyGEOB, FrameBodyGRID, FrameBodyIPLS, FrameBodyLINK, FrameBodyMCDI, FrameBodyMLLT, FrameBodyOWNE, FrameBodyPCNT, FrameBodyPOPM, FrameBodyPOSS, FrameBodyPRIV, FrameBodyRBUF, FrameBodyRVA2, FrameBodyRVAD, FrameBodyRVRB, FrameBodySEEK, FrameBodySIGN, FrameBodySYLT, FrameBodySYTC, FrameBodyTXXX, FrameBodyUFID, FrameBodyUnsupported, FrameBodyUSER, FrameBodyUSLT, FrameBodyWXXX

public abstract class AbstractID3v2FrameBody
extends AbstractMP3FragmentBody

Each ID3v2 frame contains a header and then the payload. This is the super class for the payload

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
protected AbstractID3v2FrameBody()
          Creates a new AbstractID3v2FrameBody object.
protected AbstractID3v2FrameBody(AbstractID3v2FrameBody copyObject)
          Creates a new AbstractID3v2FrameBody object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this object and its entire MP3Object array list equals the argument.
protected  int readHeader(java.io.RandomAccessFile file)
          Reads the header for the fragment body.
protected  void writeHeader(java.io.RandomAccessFile file, int size)
          Write the body header to the file at the current file position.
 
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody
appendToObjectList, getBriefDescription, getDescription, getObject, getObjectListIterator, getSize, has6ByteHeader, isSubsetOf, iterator, read, setObject, setupObjectList, toString, write
 
Methods inherited from class org.farng.mp3.AbstractMP3FileItem
getIdentifier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractID3v2FrameBody

protected AbstractID3v2FrameBody()
Creates a new AbstractID3v2FrameBody object.


AbstractID3v2FrameBody

protected AbstractID3v2FrameBody(AbstractID3v2FrameBody copyObject)
Creates a new AbstractID3v2FrameBody object.

Parameters:
copyObject - the object to copy
Method Detail

equals

public boolean equals(java.lang.Object obj)
Description copied from class: AbstractMP3FragmentBody
Returns true if this object and its entire MP3Object array list equals the argument. This object is equal to the argument only if they are the same class.

Overrides:
equals in class AbstractMP3FragmentBody
Parameters:
obj - object to determine equality of
Returns:
true if this object and its entire MP3Object array list equals the argument.

readHeader

protected int readHeader(java.io.RandomAccessFile file)
                  throws java.io.IOException,
                         InvalidTagException
Description copied from class: AbstractMP3FragmentBody
Reads the header for the fragment body. The header contains things such as the length.

Specified by:
readHeader in class AbstractMP3FragmentBody
Parameters:
file - file to read the header from.
Returns:
size of body in bytes as stated in the header.
Throws:
java.io.IOException - on any I/O error
InvalidTagException - if there is any error in the data format.

writeHeader

protected void writeHeader(java.io.RandomAccessFile file,
                           int size)
                    throws java.io.IOException
Description copied from class: AbstractMP3FragmentBody
Write the body header to the file at the current file position.

Specified by:
writeHeader in class AbstractMP3FragmentBody
Parameters:
file - file to write to
size - number of bytes the body contains.
Throws:
java.io.IOException - on any I/O error