|
|||||||||||
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.AbstractMP3FragmentBody org.farng.mp3.id3.AbstractID3v2FrameBody org.farng.mp3.id3.FrameBodySYLT
This is another way of incorporating the words, said or sung lyrics,
in the audio
file as text, this time, however, in sync with the
audio. It might also be used to describing events
e.g. occurring on a
<Header for 'Synchronised lyrics/text', ID: "SYLT">
Content type: $00 is other
Time stamp format:
$01 Absolute time, 32 bit sized, using MPEG [MPEG] frames as unit
Absolute time means that every stamp contains the time from the
beginning of the
file.
The text that follows the frame header differs from that of the
Terminated text to be synced (typically a syllable)
Sync
identifier (terminator to above string) $00 (00)
Time
stamp
$xx (xx ...)
The 'time stamp' is set to zero or the whole sync is omitted if
located directly at
the beginning of the sound. All time stamps
should be sorted in chronological order. The sync can be
considered
as a validator of the subsequent string.
Newline characters are allowed in all "SYLT" frames and MUST be used
after
every entry (name, event etc.) in a frame with the content type
$03 - $04.
A few considerations regarding whitespace characters: Whitespace
An example: The "USLT" passage
"Strangers in the night" $0A "Exchanging glances"
would be "SYLT" encoded as:
"Strang" $00 xx xx "ers" $00 xx xx " in" $00 xx xx "
the" $00 xx xx
There may be more than one "SYLT" frame in each tag, but only one
with the
same language and content descriptor.
Constructor Summary | |
FrameBodySYLT()
Creates a new FrameBodySYLT object. |
|
FrameBodySYLT(byte textEncoding,
java.lang.String language,
byte timeStampFormat,
byte contentType,
java.lang.String description)
Creates a new FrameBodySYLT object. |
|
FrameBodySYLT(FrameBodySYLT copyObject)
Creates a new FrameBodySYLT object. |
|
FrameBodySYLT(java.io.RandomAccessFile file)
Creates a new FrameBodySYLT object. |
Method Summary | |
void |
addLyric(int timeStamp,
java.lang.String text)
|
void |
addLyric(ObjectLyrics3Line line)
|
void |
equals()
This method is not yet supported. |
byte |
getContentType()
|
java.lang.String |
getDescription()
This method calls toString for all it's objects and appends them. |
java.lang.String |
getIdentifier()
ID string that usually corresponds to the class name, but can be displayed to the user. |
java.lang.String |
getLanguage()
|
java.lang.String |
getLyric()
|
int |
getSize()
Returns the estimated size in bytes of this object if it was to be written to file. |
byte |
getTextEncoding()
|
byte |
getTimeStampFormat()
|
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 |
readByteArray(byte[] arr)
|
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. |
byte[] |
writeByteArray()
|
Methods inherited from class org.farng.mp3.id3.AbstractID3v2FrameBody |
equals, readHeader, writeHeader |
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody |
appendToObjectList, getBriefDescription, getObject, getObjectListIterator, has6ByteHeader, isSubsetOf, setObject |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FrameBodySYLT()
public FrameBodySYLT(FrameBodySYLT copyObject)
public FrameBodySYLT(byte textEncoding, java.lang.String language, byte timeStampFormat, byte contentType, java.lang.String description)
public FrameBodySYLT(java.io.RandomAccessFile file) throws java.io.IOException, InvalidTagException
Method Detail |
public byte getContentType()
public java.lang.String getDescription()
AbstractMP3FragmentBody
toString
for all it's objects and appends them. It contains new line characters
and is more suited for display purposes
getDescription
in class AbstractMP3FragmentBody
public java.lang.String getIdentifier()
AbstractMP3FileItem
getIdentifier
in class AbstractMP3FileItem
public java.lang.String getLanguage()
public java.lang.String getLyric()
public int getSize()
AbstractMP3FragmentBody
getSize
in class AbstractMP3FragmentBody
public byte getTextEncoding()
public byte getTimeStampFormat()
public void addLyric(int timeStamp, java.lang.String text)
public void addLyric(ObjectLyrics3Line line)
public void equals()
java.lang.UnsupportedOperationException
- This method is not yet supportedpublic java.util.Iterator iterator()
AbstractMP3FragmentBody
MP3Object
object list.
iterator
in class AbstractMP3FragmentBody
MP3Object
object list.protected void setupObjectList()
AbstractMP3FragmentBody
MP3Object
objects that this body expects. This method needs to be overwritten.
setupObjectList
in class AbstractMP3FragmentBody
public void read(java.io.RandomAccessFile file) throws java.io.IOException, InvalidTagException
AbstractMP3FragmentBody
read
in class AbstractMP3FragmentBody
file
- file to read from
InvalidTagException
- if there is any error in the data format.
java.io.IOException
- on any I/O errorpublic void readByteArray(byte[] arr)
public java.lang.String toString()
AbstractMP3FragmentBody
toString
for all MP3Object
objects and creates a string with a new line
character.
toString
in class AbstractMP3FragmentBody
public void write(java.io.RandomAccessFile file) throws java.io.IOException
AbstractMP3FragmentBody
write
in class AbstractMP3FragmentBody
file
- destination file
java.io.IOException
- on any I/O errorpublic byte[] writeByteArray()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |