org.farng.mp3.lyrics3
Class FieldBodyLYR

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
      extended by org.farng.mp3.AbstractMP3FragmentBody
          extended by org.farng.mp3.lyrics3.AbstractLyrics3v2FieldBody
              extended by org.farng.mp3.lyrics3.FieldBodyLYR
All Implemented Interfaces:
MP3MetadataContainer

public class FieldBodyLYR
extends AbstractLyrics3v2FieldBody

Lyrics multi line text. Timestamps can be used anywhere in the text in any order. Timestamp format is [mm:ss] (no spaces allowed in the timestamps).

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
FieldBodyLYR()
          Creates a new FieldBodyLYR object.
FieldBodyLYR(FieldBodyLYR copyObject)
          Creates a new FieldBodyLYR object.
FieldBodyLYR(FrameBodySYLT sync)
          Creates a new FieldBodyLYR object.
FieldBodyLYR(FrameBodyUSLT unsync)
          Creates a new FieldBodyLYR object.
FieldBodyLYR(java.io.RandomAccessFile file)
          Creates a new FieldBodyLYR object.
FieldBodyLYR(java.lang.String line)
          Creates a new FieldBodyLYR object.
 
Method Summary
 void addLyric(FrameBodySYLT sync)
           
 void addLyric(FrameBodyUSLT unsync)
           
 boolean equals(java.lang.Object obj)
          Returns true if this object and its entire MP3Object array list equals the argument.
 java.lang.String getIdentifier()
           
 java.lang.String getLyric()
           
 int getSize()
          Returns the estimated size in bytes of this object if it was to be written to file.
 boolean hasTimeStamp()
           
 boolean isSubsetOf(java.lang.Object object)
          Returns true if this instance and its entire MP3Object array list is a subset of the argument.
 java.util.Iterator iterator()
          Returns an iterator of the MP3Object object list.
 void read(java.io.RandomAccessFile file)
          Read the data from the given file into this object.
 void setLyric(java.lang.String str)
           
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.lyrics3.AbstractLyrics3v2FieldBody
readHeader, writeHeader
 
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody
appendToObjectList, getBriefDescription, getDescription, getObject, getObjectListIterator, has6ByteHeader, setObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldBodyLYR

public FieldBodyLYR()
Creates a new FieldBodyLYR object.


FieldBodyLYR

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


FieldBodyLYR

public FieldBodyLYR(java.lang.String line)
Creates a new FieldBodyLYR object.


FieldBodyLYR

public FieldBodyLYR(FrameBodySYLT sync)
Creates a new FieldBodyLYR object.


FieldBodyLYR

public FieldBodyLYR(FrameBodyUSLT unsync)
Creates a new FieldBodyLYR object.


FieldBodyLYR

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

Throws:
InvalidTagException
java.io.IOException
Method Detail

getIdentifier

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

setLyric

public void setLyric(java.lang.String str)

getLyric

public java.lang.String getLyric()

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.

addLyric

public void addLyric(FrameBodySYLT sync)

addLyric

public void addLyric(FrameBodyUSLT unsync)

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.

hasTimeStamp

public boolean hasTimeStamp()

iterator

public java.util.Iterator iterator()
Description copied from class: AbstractMP3FragmentBody
Returns an iterator of the MP3Object object list.

Overrides:
iterator in class AbstractMP3FragmentBody
Returns:
iterator of the MP3Object object list.

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 InvalidTagException,
                 java.io.IOException
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:
InvalidTagException - if there is any error in the data format.
java.io.IOException - on any I/O error

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