Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitPRIVID3V2Frame(this);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof PRIVID3V2Frame)))
{
return false;
}
PRIVID3V2Frame oOtherPRIV = (PRIVID3V2Frame)oOther;
return (m_sOwnerIdentifier.equals(oOtherPRIV.m_sOwnerIdentifier) &&
Arrays.equals(m_abyPrivateData, oOtherPRIV.m_abyPrivateData));
|
protected byte[] | getFrameId()
return "PRIV".getBytes();
|
public java.lang.String | getOwnerIdentifier()Get the owner identifier.
return m_sOwnerIdentifier;
|
public byte[] | getPrivateData()Get private data.
return m_abyPrivateData;
|
public void | setPrivateInformation(java.lang.String sOwnerIdentifier, byte[] abyPrivateData)Set private information.
String sOrigOwnerIdentifier = m_sOwnerIdentifier;
byte[] abyOrigPrivateData = m_abyPrivateData;
if ((sOwnerIdentifier == null) || (sOwnerIdentifier.length() == 0))
{
throw new ID3Exception("Owner identifier required in PRIV frame.");
}
if (abyPrivateData == null)
{
throw new ID3Exception("Private data required in PRIV frame.");
}
m_sOwnerIdentifier = sOwnerIdentifier;
m_abyPrivateData = abyPrivateData;
// try this update, and reverse it if it generates and error
try
{
notifyID3Observers();
}
catch (ID3Exception e)
{
m_sOwnerIdentifier = sOrigOwnerIdentifier;
m_abyPrivateData = abyOrigPrivateData;
throw e;
}
|
public java.lang.String | toString()
return "Private information: Ownership identifier=[" + m_sOwnerIdentifier +
"], Private data length=[" + m_abyPrivateData.length + "]";
|
protected void | writeBody(ID3DataOutputStream oIDOS)
// ownership identifier string
oIDOS.write(m_sOwnerIdentifier.getBytes());
oIDOS.writeUnsignedByte(0);
// private data
oIDOS.write(m_abyPrivateData);
|