FileDocCategorySizeDatePackage
TSRCTextInformationID3V2Frame.javaAPI Docjid3 0.463743Sun Feb 06 18:11:24 GMT 2005org.blinkenlights.jid3.v2

TSRCTextInformationID3V2Frame

public class TSRCTextInformationID3V2Frame extends TextInformationID3V2Frame
author
paul Text frame containing the International Standard Recording Code (ISRC) for this track. ISRC codes are 12 characters in length.

Fields Summary
private String
m_sISRC
Constructors Summary
public TSRCTextInformationID3V2Frame(String sISRC)
Constructor.

param
sISRC the ISRC code for this track
throws
ID3Exception if the ISRC code is not 12 characters in length

    
                              
      
         
    
        super(sISRC);
              
        if (sISRC.length() != 12)
        {
            throw new ID3Exception("ISRC code must be 12 characters long.");
        }
        
        m_sISRC = sISRC;
    
public TSRCTextInformationID3V2Frame(InputStream oIS)

        super(oIS);
        
        // we're not going to enforce the 12-character limit when reading tracks
        
        m_sISRC = m_sInformation;
    
Methods Summary
public voidaccept(ID3Visitor oID3Visitor)

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

        if ((oOther == null) || (!(oOther instanceof TSRCTextInformationID3V2Frame)))
        {
            return false;
        }
        
        TSRCTextInformationID3V2Frame oOtherTSRC = (TSRCTextInformationID3V2Frame)oOther;
        
        return (m_sISRC.equals(oOtherTSRC.m_sISRC) &&
                m_oTextEncoding.equals(oOtherTSRC.m_oTextEncoding) &&
                m_sInformation.equals(oOtherTSRC.m_sInformation));
    
protected byte[]getFrameId()

        return "TSRC".getBytes();
    
public java.lang.StringgetISRC()
Get the ISRC code for this track.

return
the ISRC code for this track

        return m_sISRC;
    
public voidsetISRC(java.lang.String sISRC)
Set the ISRC code for this track.

param
sISRC the ISRC code for this track
throws
ID3Exception if the ISRC code is not 12 characters in length

        if (sISRC.length() != 12)
        {
            throw new ID3Exception("ISRC code must be 12 characters long.");
        }
        
        m_sISRC = sISRC;
        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = sISRC;
    
public java.lang.StringtoString()

        return "International Standard Recording Code (ISRC): [" + m_sInformation + "]";