FileDocCategorySizeDatePackage
TDLYTextInformationID3V2Frame.javaAPI Docjid3 0.463967Sun Feb 06 18:11:15 GMT 2005org.blinkenlights.jid3.v2

TDLYTextInformationID3V2Frame

public class TDLYTextInformationID3V2Frame extends TextInformationID3V2Frame
author
paul Text frame which contains the playlist delay value.

Fields Summary
private int
m_iPlaylistDelayMillis
Constructors Summary
public TDLYTextInformationID3V2Frame(int iPlaylistDelayMillis)
Constructor.

param
iPlaylistDelayMillis the playlist delay in milliseconds
throws
ID3Exception if the playlist delay is negative

        super(Integer.toString(iPlaylistDelayMillis));
        
        if (iPlaylistDelayMillis < 0)
        {
            throw new ID3Exception("Playlist delay cannot be negative.");
        }
        
        m_iPlaylistDelayMillis = iPlaylistDelayMillis;
    
public TDLYTextInformationID3V2Frame(InputStream oIS)

        super(oIS);
        
        try
        {
            m_iPlaylistDelayMillis = Integer.parseInt(m_sInformation);
        }
        catch (Exception e)
        {
            throw new InvalidFrameID3Exception("Encountered corrupt TDLY playlist delay frame.", e);
        }
    
Methods Summary
public voidaccept(ID3Visitor oID3Visitor)

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

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

        return "TDLY".getBytes();
    
public intgetPlaylistDelay()
Get the playlist delay value.

return
the playlist delay value

        return m_iPlaylistDelayMillis;
    
public voidsetPlaylistDelay(int iPlaylistDelayMillis)
Set the playlist delay value.

param
iPlaylistDelayMillis the playlist delay in milliseconds
throws
ID3Exception if the playlist delay is negative

        if (iPlaylistDelayMillis < 0)
        {
            throw new ID3Exception("Playlist delay cannot be negative.");
        }

        m_iPlaylistDelayMillis = iPlaylistDelayMillis;
        
        m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
        m_sInformation = Integer.toString(iPlaylistDelayMillis);
    
public java.lang.StringtoString()

        return "Playlist delay: [" + m_sInformation + "]";