org.farng.mp3
Class AbstractMP3FileItem

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
Direct Known Subclasses:
AbstractMP3Fragment, AbstractMP3FragmentBody, AbstractMP3Tag

public abstract class AbstractMP3FileItem
extends java.lang.Object

This class is a facade for all classes that can write to an MP3 file. It has abstract methods that needs to be implemented, and a few default implementations of other methods.

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
protected AbstractMP3FileItem()
          Creates a new AbstractMP3FileItem object.
protected AbstractMP3FileItem(AbstractMP3FileItem copyObject)
          Creates a new AbstractMP3FileItem object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if this object and its body equals the argument and its body.
abstract  java.lang.String getIdentifier()
           
abstract  int getSize()
           
 boolean isSubsetOf(java.lang.Object object)
          Returns true if this object is a subset of the argument.
abstract  void read(java.io.RandomAccessFile file)
          import java.io.IOException; import java.io.RandomAccessFile; read from current file pointer position.
abstract  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 java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMP3FileItem

protected AbstractMP3FileItem()
Creates a new AbstractMP3FileItem object.


AbstractMP3FileItem

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

Method Detail

getIdentifier

public abstract java.lang.String getIdentifier()

getSize

public abstract int getSize()

read

public abstract void read(java.io.RandomAccessFile file)
                   throws TagException,
                          java.io.IOException
import java.io.IOException; import java.io.RandomAccessFile; read from current file pointer position.

Parameters:
file - file to read from
Throws:
TagException - on any exception generated by this library.
java.io.IOException - on any I/O error

write

public abstract void write(java.io.RandomAccessFile file)
                    throws TagException,
                           java.io.IOException
Method to write this object to the file argument at is current file pointer position.

Parameters:
file - file to write to
Throws:
java.io.IOException - on any I/O error
TagException

isSubsetOf

public boolean isSubsetOf(java.lang.Object object)
Returns true if this object is a subset of the argument. This instance is a subset if it is the same class as the argument.

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

Overrides:
equals in class java.lang.Object
Parameters:
obj - object to determine equality of
Returns:
true if this object and its body are equal