FileDocCategorySizeDatePackage
TEXTTextInformationID3V2Frame.javaAPI Docjid3 0.465346Sun Feb 06 18:11:23 GMT 2005org.blinkenlights.jid3.v2

TEXTTextInformationID3V2Frame

public class TEXTTextInformationID3V2Frame extends TextInformationID3V2Frame
author
paul Text frame containing the lyricist(s) or author(s) of the text in the recording in this track.

Fields Summary
private String[]
m_asLyricist
Constructors Summary
public TEXTTextInformationID3V2Frame(String sLyricist)
Constructor.

param
sLyricist the lyricist or author of the text for this track

    
                      
      
    
        super(sLyricist);
        
        m_asLyricist = getLyricists(sLyricist);
    
public TEXTTextInformationID3V2Frame(String[] asLyricist)
Constructor.

param
asLyricist the lyricist(s) or author(s) of the text for this track

        super("");
        
        // build single string of lyricists, separated by "/", as described in ID3 spec
        StringBuffer sbLyricists = new StringBuffer();
        for (int i=0; i < asLyricist.length; i++)
        {
            sbLyricists.append(asLyricist[i] + "/");
        }
        sbLyricists.deleteCharAt(sbLyricists.length()-1);   // delete last "/"
        m_sInformation = sbLyricists.toString();
        
        m_asLyricist = getLyricists(m_sInformation);
    
public TEXTTextInformationID3V2Frame(InputStream oIS)

        super(oIS);

        m_asLyricist = getLyricists(m_sInformation);
    
Methods Summary
public voidaccept(ID3Visitor oID3Visitor)

        oID3Visitor.visitTEXTTextInformationID3V2Frame(this);
    
public booleanequals(java.lang.Object oOther)

        if ((oOther == null) || (!(oOther instanceof TEXTTextInformationID3V2Frame)))
        {
            return false;
        }
        
        TEXTTextInformationID3V2Frame oOtherTEXT = (TEXTTextInformationID3V2Frame)oOther;
        
        return (m_sInformation.equals(oOtherTEXT.m_sInformation) &&
                m_oTextEncoding.equals(oOtherTEXT.m_oTextEncoding) &&
                Arrays.equals(m_asLyricist, oOtherTEXT.m_asLyricist));
    
protected byte[]getFrameId()

        return "TEXT".getBytes();
    
private java.lang.String[]getLyricists(java.lang.String sValue)
Split a string containing potentially several distinct values (forward-slash separated) into an array of Strings, one value per String.

param
sValue value to be separated
return
an array of values

        String[] asLyricist = sValue.split("/");
        
        return asLyricist;
    
public java.lang.String[]getLyricists()
Get the lyricist(s) or author(s) of the text for this track

return
the lyricist(s) or author(s) of the text for this track

        return m_asLyricist;
    
public voidsetLyricist(java.lang.String sLyricist)
Set the lyricist(s) or author(s) of the text in the recording in this track. Multiple lyricists can optionally be set with this method by separating them with a slash "/" character.

param
sLyricist the lyricist for this track

        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = sLyricist;
        m_asLyricist = getLyricists(sLyricist);
    
public voidsetLyricists(java.lang.String[] asLyricist)
Set the lyricist(s) or author(s) of the text in the recording in this track.

param
asLyricist the lyricists for this track

        // build single string of lyricists, separated by "/", as described in ID3 spec
        StringBuffer sbLyricists = new StringBuffer();
        for (int i=0; i < asLyricist.length; i++)
        {
            sbLyricists.append(asLyricist[i] + "/");
        }
        sbLyricists.deleteCharAt(sbLyricists.length()-1);   // delete last "/"
        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = sbLyricists.toString();
        
        m_asLyricist = getLyricists(m_sInformation);
    
public java.lang.StringtoString()

        return "Lyricist(s)/Text writer(s): [" + m_sInformation + "]";