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

TLENTextInformationID3V2Frame

public class TLENTextInformationID3V2Frame extends TextInformationID3V2Frame
author
paul Text frame containing the length of the track in milliseconds.

Fields Summary
private int
m_iLengthInMilliseconds
Constructors Summary
public TLENTextInformationID3V2Frame(int iLengthInMilliseconds)
Constructor.

param
iLengthInMilliseconds the length of the track to be tagged, in milliseconds

        super(Integer.toString(iLengthInMilliseconds));
        
        m_iLengthInMilliseconds = iLengthInMilliseconds;
    
public TLENTextInformationID3V2Frame(InputStream oIS)

        super(oIS);
        
        try
        {
            m_iLengthInMilliseconds = Integer.parseInt(m_sInformation);
        }
        catch (Exception e)
        {
            throw new InvalidFrameID3Exception("Encountered corrupt TLEN track length frame.", e);
        }
    
Methods Summary
public voidaccept(ID3Visitor oID3Visitor)

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

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

        return "TLEN".getBytes();
    
public intgetTrackLength()
Get the length of this track.

return
the length of the track, in milliseconds

        return m_iLengthInMilliseconds;
    
public voidsetTrackLength(int iLengthInMilliseconds)
Set the length of this track.

param
iLengthInMilliseconds the length of the track to be tagged, in milliseconds

        m_iLengthInMilliseconds = iLengthInMilliseconds;
        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = Integer.toString(iLengthInMilliseconds);
    
public java.lang.StringtoString()

        return "Length (milliseconds): [" + m_sInformation + "]";