Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitEQUAID3V2Frame(this);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof EQUAID3V2Frame)))
{
return false;
}
EQUAID3V2Frame oOtherEQUA = (EQUAID3V2Frame)oOther;
return ((m_byAdjustmentBits == oOtherEQUA.m_byAdjustmentBits) &&
m_oFrequencyToAdjustmentMap.equals(oOtherEQUA.m_oFrequencyToAdjustmentMap));
|
public org.blinkenlights.jid3.v2.EQUAID3V2Frame$Adjustment | getAdjustment(int iFrequency)Get the currently set adjustment for a given frequency.
if ((iFrequency < 0) || (iFrequency > 32767))
{
throw new ID3Exception("Valid frequency range for EQUA adjustments is from 0-32767Hz.");
}
return (Adjustment)m_oFrequencyToAdjustmentMap.get(new Integer(iFrequency));
|
public byte | getAdjustmentBits()Get the number of bits of precision for each adjustment.
return m_byAdjustmentBits;
|
public org.blinkenlights.jid3.v2.EQUAID3V2Frame$Adjustment[] | getAdjustments()Get all adjustments which have been set.
return (Adjustment[])m_oFrequencyToAdjustmentMap.values().toArray(new Adjustment[0]);
|
protected byte[] | getFrameId()
return "EQUA".getBytes();
|
public org.blinkenlights.jid3.v2.EQUAID3V2Frame$Adjustment | removeAdjustment(int iFrequency)Remove an existing adjustment.
if ((iFrequency < 0) || (iFrequency > 32767))
{
throw new ID3Exception("Valid frequency range for EQUA adjustments is from 0-32767Hz.");
}
return (Adjustment)m_oFrequencyToAdjustmentMap.remove(new Integer(iFrequency));
|
public void | setAdjustment(org.blinkenlights.jid3.v2.EQUAID3V2Frame$Adjustment oAdjustment)Set an adjustment for a given frequency. A new adjustment for a given frequency will
replace any existing one.
m_oFrequencyToAdjustmentMap.put(new Integer(oAdjustment.getFrequency()), oAdjustment);
|
public void | setAdjustmentBits(byte byAdjustmentBits)Set the number of bits of precision for each adjustment.
m_byAdjustmentBits = byAdjustmentBits;
|
public java.lang.String | toString()
// "equalization" is misspelled in the spec
return "Equalization: Adjustment Bits = " + m_byAdjustmentBits;
|
protected void | writeBody(ID3DataOutputStream oIDOS)
// adjustment bits
oIDOS.writeUnsignedByte(m_byAdjustmentBits);
// adjustments
Adjustment[] aoAdjustment = getAdjustments();
for (int i=0; i < aoAdjustment.length; i++)
{
aoAdjustment[i].write(oIDOS);
}
|