Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitGRIDID3V2Frame(this);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof GRIDID3V2Frame)))
{
return false;
}
GRIDID3V2Frame oOtherGRID = (GRIDID3V2Frame)oOther;
return ( (((m_sOwnerIdentifier == null) && (oOtherGRID.m_sOwnerIdentifier == null)) || m_sOwnerIdentifier.equals(oOtherGRID.m_sOwnerIdentifier)) &&
(m_byGroupSymbol == oOtherGRID.m_byGroupSymbol) &&
Arrays.equals(m_abyGroupDependantData, oOtherGRID.m_abyGroupDependantData));
|
protected byte[] | getFrameId()
return "GRID".getBytes();
|
public byte[] | getGroupDependantData()Get group dependant data.
return m_abyGroupDependantData;
|
public byte | getGroupSymbol()Get the group symbol for this grouping.
return m_byGroupSymbol;
|
public java.lang.String | getOwnerIdentifier()Get owner identifier information.
return m_sOwnerIdentifier;
|
public void | setGroupIdentificationRegistration(java.lang.String sOwnerIdentifier, byte byGroupSymbol, byte[] abyGroupDependantData)Set group identification registration data.
String sOrigOwnerIdentifier = m_sOwnerIdentifier;
byte byOrigGroupSymbol = m_byGroupSymbol;
byte[] abyOrigGroupDependantData = m_abyGroupDependantData;
if ((sOwnerIdentifier == null) || (sOwnerIdentifier.length() == 0))
{
throw new ID3Exception("GRID frame requires owner identifier value.");
}
m_sOwnerIdentifier = sOwnerIdentifier;
m_byGroupSymbol = byGroupSymbol;
m_abyGroupDependantData = abyGroupDependantData;
if ((m_abyGroupDependantData != null) && (m_abyGroupDependantData.length == 0))
{
m_abyGroupDependantData = null;
}
// try this update, and reverse it if it generates and error
try
{
notifyID3Observers();
}
catch (ID3Exception e)
{
m_sOwnerIdentifier = sOrigOwnerIdentifier;
m_byGroupSymbol = byOrigGroupSymbol;
m_abyGroupDependantData = abyOrigGroupDependantData;
throw e;
}
|
public java.lang.String | toString()
StringBuffer sbOutput = new StringBuffer();
sbOutput.append("Group identification registration: Owner identifier=[" + m_sOwnerIdentifier +
"], Group symbol=[" + m_byGroupSymbol + "], ");
if (m_abyGroupDependantData == null)
{
sbOutput.append("Group dependant data = none");
}
else
{
sbOutput.append("Group dependant data length = " + m_abyGroupDependantData.length);
}
return sbOutput.toString();
|
protected void | writeBody(ID3DataOutputStream oIDOS)
// owner identifier
oIDOS.write(m_sOwnerIdentifier.getBytes());
oIDOS.writeUnsignedByte(0);
// group symbol
oIDOS.writeUnsignedByte(m_byGroupSymbol);
// optional group dependant data
if (m_abyGroupDependantData != null)
{
oIDOS.write(m_abyGroupDependantData);
}
|