Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitETCOID3V2Frame(this);
|
public void | addEvent(org.blinkenlights.jid3.v2.ETCOID3V2Frame$Event oEvent)Add an event to the list. Note, only one event per exact time can be defined. An event set at
a time for which another event already is set will overwrite the existing one.
m_oTimeToEventMap.put(new Integer(oEvent.getTimestamp()), oEvent);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof ETCOID3V2Frame)))
{
return false;
}
ETCOID3V2Frame oOtherETCO = (ETCOID3V2Frame)oOther;
return (m_oTimestampFormat.equals(oOtherETCO.m_oTimestampFormat) &&
m_oTimeToEventMap.equals(oOtherETCO.m_oTimeToEventMap));
|
public org.blinkenlights.jid3.v2.ETCOID3V2Frame$Event | getEvent(int iTimestamp)Get the event which has been set for a given time.
if (iTimestamp < 0)
{
throw new ID3Exception("Negative timestamps are not valid in ETCO frames.");
}
return (Event)m_oTimeToEventMap.get(new Integer(iTimestamp));
|
public org.blinkenlights.jid3.v2.ETCOID3V2Frame$Event[] | getEvents()Get all events which have been set. Events are returned in sorted order by timestamp.
return (Event[])m_oTimeToEventMap.values().toArray(new Event[0]);
|
protected byte[] | getFrameId()
return "ETCO".getBytes();
|
public org.blinkenlights.jid3.v2.ETCOID3V2Frame$TimestampFormat | getTimestampFormat()Get the set timestamp format.
return m_oTimestampFormat;
|
public org.blinkenlights.jid3.v2.ETCOID3V2Frame$Event | removeEvent(org.blinkenlights.jid3.v2.ETCOID3V2Frame$Event oEvent)Remove the event set for a specific time.
return (Event)m_oTimeToEventMap.remove(new Integer(oEvent.getTimestamp()));
|
public java.lang.String | toString()
StringBuffer sbOutput = new StringBuffer();
sbOutput.append("Event Timing Codes: Timestamp format = " + m_oTimestampFormat.getValue());
sbOutput.append(", Events = ");
Iterator oIter = m_oTimeToEventMap.values().iterator();
while (oIter.hasNext())
{
Event oEvent = (Event)oIter.next();
sbOutput.append(oEvent.getEventType().getValue() + ":" + oEvent.getTimestamp() + " ");
}
return sbOutput.toString();
|
protected void | writeBody(ID3DataOutputStream oIDOS)
// timestamp format
oIDOS.writeUnsignedByte(m_oTimestampFormat.getValue());
// events
Iterator oIter = m_oTimeToEventMap.values().iterator();
while (oIter.hasNext())
{
Event oEvent = (Event)oIter.next();
oIDOS.writeUnsignedByte(oEvent.getEventType().getValue());
oIDOS.writeBE32(oEvent.getTimestamp());
}
|