org.farng.mp3.lyrics3
Class Lyrics3v2Field

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
      extended by org.farng.mp3.AbstractMP3Fragment
          extended by org.farng.mp3.lyrics3.Lyrics3v2Field
All Implemented Interfaces:
MP3MetadataItem

public class Lyrics3v2Field
extends AbstractMP3Fragment

Defined fields

The following list is a list of currently defined field IDs. More fields might be added if needed on newer versions of the Lyrics3 v2.00 specifications. Unknown fields should be ignored.

ID Max size Description
IND 00002 Indications field. This is always two characters big in v2.00, but might be bigger in a future standard. The first byte indicates wether or not a lyrics field is present. "1" for present and "0" for otherwise. The second character indicates if there is a timestamp in the lyrics. Again "1" for yes and "0" for no.
LYR 99999 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).
INF 99999 Additional information multi line text.
AUT 00250 Lyrics/Music Author name.
EAL 00250 Extended Album name.
EAR 00250 Extended Artist name.
ETT 00250 Extended Track Title.
IMG 99999 Link to an image files (BMP or JPG format). Image lines include filename, description and timestamp separated by delimiter - two ASCII chars 124 ("||"). Description and timestamp are optional, but if timestamp is used, and there is no description, two delimiters ("||||") should be used between the filename and the timestamp. Multiple images are allowed by using a [CR][LF] delimiter between each image line. No [CR][LF] is needed after the last image line. Number of images is not limited (except by the field size).
Filename can be in one of these formats:
  • Filename only - when the image is located in the same path as the MP3 file (preferred, since if you move the mp3 file this will still be correct)
  • Relative Path + Filename - when the image is located in a subdirectory below the MP3 file (i.e. images\cover.jpg)
  • Full path + Filename - when the image is located in a totally different path or drive. This will not work if the image is moved or drive letters has changed, and so should be avoided if possible (i.e. c:\images\artist.jpg)
Description can be up to 250 chars long.
Timestamp must be formatted like the lyrics timestamp which is "[mm:ss]". If an image has a timestamp, then the visible image will automatically switch to that image on the timestamp play time, just the same as the selected lyrics line is switched based on timestamps.

*

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
Lyrics3v2Field()
          Creates a new Lyrics3v2Field object.
Lyrics3v2Field(AbstractID3v2Frame frame)
          Creates a new Lyrics3v2Field object.
Lyrics3v2Field(AbstractLyrics3v2FieldBody body)
          Creates a new Lyrics3v2Field object.
Lyrics3v2Field(Lyrics3v2Field copyObject)
          Creates a new Lyrics3v2Field object.
Lyrics3v2Field(java.io.RandomAccessFile file)
          Creates a new Lyrics3v2Field object.
 
Method Summary
 java.lang.String getIdentifier()
          ID string that usually corresponds to the class name, but can be displayed to the user.
 int getSize()
          Get the size of the item, in bytes.
 void read(java.io.RandomAccessFile file)
          import java.io.IOException; import java.io.RandomAccessFile; read from current file pointer position.
 java.lang.String toString()
           
 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.AbstractMP3Fragment
equals, getBody, isSubsetOf, setBody
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Lyrics3v2Field

public Lyrics3v2Field()
Creates a new Lyrics3v2Field object.


Lyrics3v2Field

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


Lyrics3v2Field

public Lyrics3v2Field(AbstractLyrics3v2FieldBody body)
Creates a new Lyrics3v2Field object.


Lyrics3v2Field

public Lyrics3v2Field(AbstractID3v2Frame frame)
               throws TagException
Creates a new Lyrics3v2Field object.

Throws:
TagException

Lyrics3v2Field

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

Throws:
InvalidTagException
java.io.IOException
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Description copied from interface: MP3MetadataItem
ID string that usually corresponds to the class name, but can be displayed to the user. It is not intended to identify each individual instance.

Specified by:
getIdentifier in interface MP3MetadataItem
Specified by:
getIdentifier in class AbstractMP3FileItem
Returns:
ID string

getSize

public int getSize()
Description copied from interface: MP3MetadataItem
Get the size of the item, in bytes.

Specified by:
getSize in interface MP3MetadataItem
Specified by:
getSize in class AbstractMP3FileItem
Returns:
size

read

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

Specified by:
read in class AbstractMP3FileItem
Parameters:
file - file to read from
Throws:
java.io.IOException - on any I/O error
InvalidTagException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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.

Specified by:
write in class AbstractMP3FileItem
Parameters:
file - file to write to
Throws:
java.io.IOException - on any I/O error