org.jaudiotagger.tag.id3.framebody
Class FrameBodyUSLT

java.lang.Object
  extended by org.jaudiotagger.tag.id3.AbstractTagItem
      extended by org.jaudiotagger.tag.id3.AbstractTagFrameBody
          extended by org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody
              extended by org.jaudiotagger.tag.id3.framebody.FrameBodyUSLT
All Implemented Interfaces:
ID3v23FrameBody, ID3v24FrameBody

public class FrameBodyUSLT
extends AbstractID3v2FrameBody
implements ID3v23FrameBody, ID3v24FrameBody

Unsychronised lyrics/text transcription frame.

This frame contains the lyrics of the song or a text transcription of other vocal activities. The head includes an encoding descriptor and a content descriptor. The body consists of the actual text. The 'Content descriptor' is a terminated string. If no descriptor is entered, 'Content descriptor' is $00 (00) only. Newline characters are allowed in the text. There may be more than one 'Unsynchronised lyrics/text transcription' frame in each tag, but only one with the same language and content descriptor.

<Header for 'Unsynchronised lyrics/text transcription', ID: "USLT">
Text encoding $xx
Language $xx xx xx
Content descriptor<text string according to encoding> $00 (00)
Lyrics/text <full text string according to encoding>

You can retrieve the first value without the null terminator using getFirstTextValue()

For more details, please refer to the ID3 specifications:

Version:
$Id: FrameBodyUSLT.java,v 1.25 2009/11/12 15:42:57 paultaylor Exp $
Author:
: Paul Taylor, : Eric Farng

Field Summary
 
Fields inherited from class org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody
TYPE_BODY
 
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagFrameBody
objectList
 
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagItem
logger
 
Constructor Summary
FrameBodyUSLT()
          Creates a new FrameBodyUSLT datatype.
FrameBodyUSLT(java.nio.ByteBuffer byteBuffer, int frameSize)
          Creates a new FrameBodyUSLT datatype, populated from buffer
FrameBodyUSLT(byte textEncoding, java.lang.String language, java.lang.String description, java.lang.String text)
          Creates a new FrameBodyUSLT datatype.
FrameBodyUSLT(FrameBodyUSLT body)
          Copy constructor
 
Method Summary
 void addLyric(Lyrics3Line line)
           
 void addLyric(java.lang.String text)
          Add additional lyric to the lyric field
 java.lang.String getDescription()
          Get a description field
 java.lang.String getFirstTextValue()
          Get first value
 java.lang.String getIdentifier()
          The ID3v2 frame identifier
 java.lang.String getLanguage()
          Get the language field
 java.lang.String getLyric()
          Get the lyric field
 void setDescription(java.lang.String description)
          Set a description field
 void setLanguage(java.lang.String language)
          Set the language field
 void setLyric(java.lang.String lyric)
          Set the lyric field
protected  void setupObjectList()
          Create the list of Datatypes that this body expects in the correct order This method needs to be implemented by concrete subclasses
 void write(java.io.ByteArrayOutputStream tagBuffer)
          Write the contents of this datatype to the byte array
 
Methods inherited from class org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody
createStructure, equals, getSize, read, setSize, setSize
 
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagFrameBody
getBriefDescription, getHeader, getLongDescription, getObject, getObjectValue, getTextEncoding, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameBodyUSLT

public FrameBodyUSLT()
Creates a new FrameBodyUSLT datatype.


FrameBodyUSLT

public FrameBodyUSLT(FrameBodyUSLT body)
Copy constructor

Parameters:
body -

FrameBodyUSLT

public FrameBodyUSLT(byte textEncoding,
                     java.lang.String language,
                     java.lang.String description,
                     java.lang.String text)
Creates a new FrameBodyUSLT datatype.

Parameters:
textEncoding -
language -
description -
text -

FrameBodyUSLT

public FrameBodyUSLT(java.nio.ByteBuffer byteBuffer,
                     int frameSize)
              throws InvalidTagException
Creates a new FrameBodyUSLT datatype, populated from buffer

Parameters:
byteBuffer -
frameSize -
Throws:
InvalidTagException
InvalidTagException
Method Detail

setDescription

public void setDescription(java.lang.String description)
Set a description field

Parameters:
description -

getDescription

public java.lang.String getDescription()
Get a description field

Returns:
description

getIdentifier

public java.lang.String getIdentifier()
The ID3v2 frame identifier

Specified by:
getIdentifier in class AbstractID3v2FrameBody
Returns:
the ID3v2 frame identifier for this frame type

setLanguage

public void setLanguage(java.lang.String language)
Set the language field

Parameters:
language -

getLanguage

public java.lang.String getLanguage()
Get the language field

Returns:
language

setLyric

public void setLyric(java.lang.String lyric)
Set the lyric field

Parameters:
lyric -

getLyric

public java.lang.String getLyric()
Get the lyric field

Returns:
lyrics

getFirstTextValue

public java.lang.String getFirstTextValue()
Get first value

Returns:
value at index 0

addLyric

public void addLyric(java.lang.String text)
Add additional lyric to the lyric field

Parameters:
text -

addLyric

public void addLyric(Lyrics3Line line)
Parameters:
line -

write

public void write(java.io.ByteArrayOutputStream tagBuffer)
Description copied from class: AbstractID3v2FrameBody
Write the contents of this datatype to the byte array

Overrides:
write in class AbstractID3v2FrameBody

setupObjectList

protected void setupObjectList()
Description copied from class: AbstractTagFrameBody
Create the list of Datatypes that this body expects in the correct order This method needs to be implemented by concrete subclasses

Specified by:
setupObjectList in class AbstractTagFrameBody