|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.farng.mp3.AbstractMP3FileItem org.farng.mp3.AbstractMP3Tag org.farng.mp3.lyrics3.AbstractLyrics3 org.farng.mp3.lyrics3.Lyrics3v2
What is Lyrics3 v2.00? |
The Lyrics3 v2.00 tag is more complicated than the previous Lyrics3 tag but has a lot more capabilities. Just like the old Lyrics3 tag it resides between the audio and the ID3 tag, which must be present. The tag uses only text for everything from content to size descriptors, which are represented as numerical strings. This makes it easier to implement a Lyrics3 v2.00 reader. At least if BASIC is your language of choice. The Lyrics3 block, after the MP3 audio and before the ID3 tag, begins with the word "LYRICSBEGIN" after which a number of field records follows. The Lyrics3 block ends with a six character size descriptor and the string "LYRICS200". The size value includes the "LYRICSBEGIN" and "LYRICS200" strings. Lyrics2 v2.00 uses somthing called fields to represent information. The data in a field can consist of ASCII characters in the range 01 to 254 according to the standard. As the ASCII character map is only defined from 00 to 128 ISO-8859-1 might be assumed. Numerical fields are 5 or 6 characters long, depending on location, and are padded with zeroes. Only the size of the tag sets the limit for how many fields may be present. All fields uses a simple structure that includes a three character field ID, six characters describing the size of the information and the actual information. This makes it possible to read unknown fields and write them back when saving the tag. There are no required fields in the tag, but at least one field must exist. Fields can appear in any order in the tag, except the indication field which must be the first field if used. Fields that include more then one line uses [CR][LF] delimiters between lines. |
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.
|
The extended Album, Artist and Track are an extension to the fields in the ID3v1 tag - which are limited to 30 chars. If these extended fields exist, make sure their first 30 chars are exactly the same as the ones in the ID3v1 tag. If they are the same, display the extended field. If not, display the one from the ID tag. These 'mismatched' extended fields, should be removed when saving the lyrics tag. When saving the extended fields, make sure to copy the first 30 chars of each field to the ID3 tag matching fields. It is recommended NOT to save extended fields at all, if they are not larger then 30 chars. |
Constructor Summary | |
Lyrics3v2()
Creates a new Lyrics3v2 object. |
|
Lyrics3v2(AbstractMP3Tag mp3tag)
Creates a new Lyrics3v2 object. |
|
Lyrics3v2(Lyrics3v2 copyObject)
Creates a new Lyrics3v2 object. |
|
Lyrics3v2(java.io.RandomAccessFile file)
Creates a new Lyrics3v2 object. |
Method Summary | |
void |
append(AbstractMP3Tag tag)
This method does nothing, but is called by subclasses for completeness |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this tag. |
java.lang.String |
getAlbumTitle()
|
java.lang.String |
getAuthorComposer()
|
Lyrics3v2Field |
getField(java.lang.String identifier)
Gets the value of the frame identified by identifier |
int |
getFieldCount()
|
java.lang.String |
getIdentifier()
ID string that usually corresponds to the class name, but can be displayed to the user. |
java.lang.String |
getLeadArtist()
|
int |
getSize()
|
java.lang.String |
getSongComment()
|
java.lang.String |
getSongGenre()
|
java.lang.String |
getSongLyric()
|
java.lang.String |
getSongTitle()
|
java.lang.String |
getTrackNumberOnAlbum()
|
java.lang.String |
getYearReleased()
|
boolean |
hasField(java.lang.String identifier)
|
java.util.Iterator |
iterator()
|
void |
overwrite(AbstractMP3Tag tag)
This method does nothing, but is called by subclasses for completeness |
void |
read(java.io.RandomAccessFile file)
import java.io.IOException; import java.io.RandomAccessFile; read from current file pointer position. |
void |
removeField(java.lang.String identifier)
|
boolean |
seek(java.io.RandomAccessFile file)
Looks for this tag. |
void |
setAlbumTitle(java.lang.String albumTitle)
|
void |
setAuthorComposer(java.lang.String authorComposer)
|
void |
setField(Lyrics3v2Field field)
|
void |
setLeadArtist(java.lang.String leadArtist)
|
void |
setSongComment(java.lang.String songComment)
|
void |
setSongGenre(java.lang.String songGenre)
|
void |
setSongLyric(java.lang.String songLyrics)
|
void |
setSongTitle(java.lang.String songTitle)
|
void |
setTrackNumberOnAlbum(java.lang.String trackNumberOnAlbum)
|
void |
setYearReleased(java.lang.String yearReleased)
|
java.lang.String |
toString()
|
void |
updateField(java.lang.String identifier)
|
void |
write(AbstractMP3Tag tag)
This method does nothing, but is called by subclasses for completeness |
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.lyrics3.AbstractLyrics3 |
append, delete, overwrite |
Methods inherited from class org.farng.mp3.AbstractMP3Tag |
isSubsetOf |
Methods inherited from class org.farng.mp3.AbstractMP3FileItem |
isSubsetOf |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Lyrics3v2()
public Lyrics3v2(Lyrics3v2 copyObject)
public Lyrics3v2(AbstractMP3Tag mp3tag)
public Lyrics3v2(java.io.RandomAccessFile file) throws TagNotFoundException, java.io.IOException
Method Detail |
public void setField(Lyrics3v2Field field)
public Lyrics3v2Field getField(java.lang.String identifier)
identifier
- The three letter code
public int getFieldCount()
public java.lang.String getIdentifier()
AbstractMP3FileItem
getIdentifier
in class AbstractMP3FileItem
public int getSize()
getSize
in class AbstractMP3FileItem
public void append(AbstractMP3Tag tag)
AbstractMP3Tag
append
in class AbstractMP3Tag
tag
- tag to overwritepublic boolean equals(java.lang.Object obj)
AbstractMP3Tag
super.equals(object)
.
equals
in class AbstractMP3Tag
public boolean hasField(java.lang.String identifier)
public java.util.Iterator iterator()
iterator
in class AbstractMP3Tag
public void overwrite(AbstractMP3Tag tag)
AbstractMP3Tag
overwrite
in class AbstractMP3Tag
tag
- tag to overwritepublic void read(java.io.RandomAccessFile file) throws TagNotFoundException, java.io.IOException
AbstractMP3FileItem
read
in class AbstractMP3FileItem
file
- file to read from
java.io.IOException
- on any I/O error
TagNotFoundException
public void removeField(java.lang.String identifier)
public boolean seek(java.io.RandomAccessFile file) throws java.io.IOException
AbstractMP3Tag
seek
in class AbstractMP3Tag
file
- MP3 file to overwrite
java.io.IOException
- on any I/O errorpublic java.lang.String toString()
public void updateField(java.lang.String identifier)
public void write(AbstractMP3Tag tag)
AbstractMP3Tag
write
in class AbstractMP3Tag
tag
- tag to write topublic void write(java.io.RandomAccessFile file) throws java.io.IOException
AbstractMP3FileItem
write
in class AbstractMP3FileItem
file
- file to write to
java.io.IOException
- on any I/O errorpublic java.lang.String getSongTitle()
getSongTitle
in class AbstractMP3Tag
public java.lang.String getLeadArtist()
getLeadArtist
in class AbstractMP3Tag
public java.lang.String getAlbumTitle()
getAlbumTitle
in class AbstractMP3Tag
public java.lang.String getYearReleased()
getYearReleased
in class AbstractMP3Tag
public java.lang.String getSongComment()
getSongComment
in class AbstractMP3Tag
public java.lang.String getSongGenre()
getSongGenre
in class AbstractMP3Tag
public java.lang.String getTrackNumberOnAlbum()
getTrackNumberOnAlbum
in class AbstractMP3Tag
public java.lang.String getSongLyric()
getSongLyric
in class AbstractMP3Tag
public java.lang.String getAuthorComposer()
getAuthorComposer
in class AbstractMP3Tag
public void setSongTitle(java.lang.String songTitle)
setSongTitle
in class AbstractMP3Tag
public void setLeadArtist(java.lang.String leadArtist)
setLeadArtist
in class AbstractMP3Tag
public void setAlbumTitle(java.lang.String albumTitle)
setAlbumTitle
in class AbstractMP3Tag
public void setYearReleased(java.lang.String yearReleased)
setYearReleased
in class AbstractMP3Tag
public void setSongComment(java.lang.String songComment)
setSongComment
in class AbstractMP3Tag
public void setSongGenre(java.lang.String songGenre)
setSongGenre
in class AbstractMP3Tag
public void setTrackNumberOnAlbum(java.lang.String trackNumberOnAlbum)
setTrackNumberOnAlbum
in class AbstractMP3Tag
public void setSongLyric(java.lang.String songLyrics)
setSongLyric
in class AbstractMP3Tag
public void setAuthorComposer(java.lang.String authorComposer)
setAuthorComposer
in class AbstractMP3Tag
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |