FileDocCategorySizeDatePackage
TOLYTextInformationID3V2Frame.javaAPI Docjid3 0.465685Sun Feb 06 18:11:18 GMT 2005org.blinkenlights.jid3.v2

TOLYTextInformationID3V2Frame

public class TOLYTextInformationID3V2Frame extends TextInformationID3V2Frame
author
paul Text frame which contains the original lyricist(s) or author(s) of the text in the recording in this track.

Fields Summary
private String[]
m_asOriginalLyricist
Constructors Summary
public TOLYTextInformationID3V2Frame(String sOriginalLyricist)
Constructor.

param
sOriginalLyricist the original lyricist or author of the text for this track

    
                       
      
    
        super(sOriginalLyricist);
        
        m_asOriginalLyricist = getLyricists(sOriginalLyricist);
    
public TOLYTextInformationID3V2Frame(String[] asOriginalLyricist)
Constructor.

param
asOriginalLyricist the original 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 < asOriginalLyricist.length; i++)
        {
            sbLyricists.append(asOriginalLyricist[i] + "/");
        }
        sbLyricists.deleteCharAt(sbLyricists.length()-1);   // delete last "/"
        m_sInformation = sbLyricists.toString();
        
        m_asOriginalLyricist = getLyricists(m_sInformation);
    
public TOLYTextInformationID3V2Frame(InputStream oIS)

        super(oIS);

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

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

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

        return "TOLY".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[]getOriginalLyricists()
Get the original lyricist(s) or author(s) of the text for this track

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

        return m_asOriginalLyricist;
    
public voidsetOriginalLyricist(java.lang.String sOriginalLyricist)
Set the original 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
sOriginalLyricist the original lyricist for this track

        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = sOriginalLyricist;
        m_asOriginalLyricist = getLyricists(sOriginalLyricist);
    
public voidsetOriginalLyricists(java.lang.String[] asOriginalLyricist)
Set the original lyricist(s) or author(s) of the text in the recording in this track.

param
asOriginalLyricist the original lyricists or authors of the text for this track

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

        return "Original lyricist(s)/text writer(s): [" + m_sInformation + "]";