FileDocCategorySizeDatePackage
TOPETextInformationID3V2Frame.javaAPI Docjid3 0.465662Sun Feb 06 18:11:16 GMT 2005org.blinkenlights.jid3.v2

TOPETextInformationID3V2Frame

public class TOPETextInformationID3V2Frame extends TextInformationID3V2Frame
author
paul Text frame containing the original artist(s) or performer(s) of the original recording in this track.

Fields Summary
private String[]
m_asOriginalPerformer
Constructors Summary
public TOPETextInformationID3V2Frame(String sOriginalPerformer)
Constructor.

param
sOriginalPerformer the original artist or performer for this track

    
                    
      
    
        super(sOriginalPerformer);
        
        m_asOriginalPerformer = getPerformers(sOriginalPerformer);
    
public TOPETextInformationID3V2Frame(String[] asOriginalPerformer)
Constructor.

param
asOriginalPerformer the original artist(s) or performer(s) for this track

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

        super(oIS);

        m_asOriginalPerformer = getPerformers(m_sInformation);
    
Methods Summary
public voidaccept(ID3Visitor oID3Visitor)

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

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

        return "TOPE".getBytes();
    
public java.lang.String[]getOriginalPerformers()
Get the original author(s) or performer(s) for this track

return
the original author(s) or performer(s) for this track

        return m_asOriginalPerformer;
    
private java.lang.String[]getPerformers(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[] asPerformer = sValue.split("/");
        
        return asPerformer;
    
public voidsetOriginalPerformer(java.lang.String sOriginalPerformer)
Set the original author(s) or performer(s) for the recording in this track. Multiple performers can optionally be set with this method by separating them with a slash "/" character.

param
sOriginalPerformer the original author or performer for this track

        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = sOriginalPerformer;
        m_asOriginalPerformer = getPerformers(sOriginalPerformer);
    
public voidsetOriginalPerformers(java.lang.String[] asOriginalPerformer)
Set the original author(s) or performer(s) for the recording in this track.

param
asOriginalPerformer the original author(s) or performer(s) for this track

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

        return "Original artist(s)/performer(s): [" + m_sInformation + "]";