org.farng.mp3.id3
Class FrameBodyUnsupported

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
      extended by org.farng.mp3.AbstractMP3FragmentBody
          extended by org.farng.mp3.id3.AbstractID3v2FrameBody
              extended by org.farng.mp3.id3.FrameBodyUnsupported
All Implemented Interfaces:
MP3MetadataContainer

public class FrameBodyUnsupported
extends AbstractID3v2FrameBody

This frame is used if the frame identifier is not recognized. the contents of the frame are read as a byte stream and kept so they can be saved when the file is written again

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
FrameBodyUnsupported(byte[] value)
          Creates a new FrameBodyUnsupported object.
FrameBodyUnsupported(FrameBodyUnsupported copyObject)
          Creates a new FrameBodyUnsupported object.
FrameBodyUnsupported(java.io.RandomAccessFile file)
          Creates a new FrameBodyUnsupported object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this object and its entire MP3Object array list equals the argument.
 java.lang.String getIdentifier()
           
 int getSize()
          Returns the estimated size in bytes of this object if it was to be written to file.
 boolean isSubsetOf(java.lang.Object object)
          Returns true if this instance and its entire MP3Object array list is a subset of the argument.
 void read(java.io.RandomAccessFile file)
          Read the data from the given file into this object.
protected  void setupObjectList()
          Create the order of MP3Object objects that this body expects.
 java.lang.String toString()
          Calls toString for all MP3Object objects and creates a string with a new line character.
 void write(java.io.RandomAccessFile file)
          Write the contents of this object to the file at the position it is currently at.
 
Methods inherited from class org.farng.mp3.id3.AbstractID3v2FrameBody
readHeader, writeHeader
 
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody
appendToObjectList, getBriefDescription, getDescription, getObject, getObjectListIterator, has6ByteHeader, iterator, setObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameBodyUnsupported

public FrameBodyUnsupported(byte[] value)
Creates a new FrameBodyUnsupported object.


FrameBodyUnsupported

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


FrameBodyUnsupported

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

Throws:
java.io.IOException
InvalidTagException
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Specified by:
getIdentifier in class AbstractMP3FileItem

getSize

public int getSize()
Description copied from class: AbstractMP3FragmentBody
Returns the estimated size in bytes of this object if it was to be written to file. This is not guaranteed to be accurate 100% of the time.

Overrides:
getSize in class AbstractMP3FragmentBody
Returns:
estimated size in bytes of this object

isSubsetOf

public boolean isSubsetOf(java.lang.Object object)
Description copied from class: AbstractMP3FragmentBody
Returns true if this instance and its entire MP3Object array list is a subset of the argument. This class is a subset if it is the same class as the argument.

Overrides:
isSubsetOf in class AbstractMP3FragmentBody
Parameters:
object - object to determine subset of
Returns:
true if this instance and its entire object array list is a subset of the argument.

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 AbstractID3v2FrameBody
Parameters:
obj - object to determine equality of
Returns:
true if this object and its entire MP3Object array list equals the argument.

setupObjectList

protected void setupObjectList()
Description copied from class: AbstractMP3FragmentBody
Create the order of MP3Object objects that this body expects. This method needs to be overwritten.

Specified by:
setupObjectList in class AbstractMP3FragmentBody

read

public void read(java.io.RandomAccessFile file)
          throws java.io.IOException,
                 InvalidTagException
Description copied from class: AbstractMP3FragmentBody
Read the data from the given file into this object. The file needs to have its file pointer in the correct location.

Overrides:
read in class AbstractMP3FragmentBody
Parameters:
file - file to read from
Throws:
java.io.IOException - on any I/O error
InvalidTagException - if there is any error in the data format.

toString

public java.lang.String toString()
Description copied from class: AbstractMP3FragmentBody
Calls toString for all MP3Object objects and creates a string with a new line character.

Overrides:
toString in class AbstractMP3FragmentBody
Returns:
description string

write

public void write(java.io.RandomAccessFile file)
           throws java.io.IOException
Description copied from class: AbstractMP3FragmentBody
Write the contents of this object to the file at the position it is currently at.

Overrides:
write in class AbstractMP3FragmentBody
Parameters:
file - destination file
Throws:
java.io.IOException - on any I/O error