Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitUFIDID3V2Frame(this);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof UFIDID3V2Frame)))
{
return false;
}
UFIDID3V2Frame oOtherUFID = (UFIDID3V2Frame)oOther;
return (m_sOwnerIdentifier.equals(oOtherUFID.m_sOwnerIdentifier) &&
Arrays.equals(m_abyIdentifier, oOtherUFID.m_abyIdentifier));
|
protected byte[] | getFrameId()
return "UFID".getBytes();
|
public byte[] | getIdentifier()Get the unique file identifier from this frame
return m_abyIdentifier;
|
public java.lang.String | getOwnerIdentifier()Get the owner identifier for this frame.
return m_sOwnerIdentifier;
|
public void | setUniqueIdentifier(java.lang.String sOwnerIdentifier, byte[] abyIdentifier)Set unique file identifier.
String sOrigOwnerIdentifier = m_sOwnerIdentifier;
byte[] abyOrigIdentifier = m_abyIdentifier;
if ((sOwnerIdentifier == null) || (sOwnerIdentifier.length() == 0))
{
throw new ID3Exception("The owner identifier cannot be null or zero length in UFID frame.");
}
if ((abyIdentifier == null) || (abyIdentifier.length > 64))
{
throw new ID3Exception("The identifier must be a non-null byte array of length 0-64 bytes in UFID frame.");
}
m_sOwnerIdentifier = sOwnerIdentifier;
m_abyIdentifier = abyIdentifier;
// try this update, and reverse it if it generates and error
try
{
notifyID3Observers();
}
catch (ID3Exception e)
{
m_sOwnerIdentifier = sOrigOwnerIdentifier;
m_abyIdentifier = abyOrigIdentifier;
throw e;
}
|
public java.lang.String | toString()
return "Unique file identifier: Owner identifier=[" + m_sOwnerIdentifier +
"], Identifier length=[" + m_abyIdentifier.length + "]";
|
protected void | writeBody(ID3DataOutputStream oIDOS)
oIDOS.write(m_sOwnerIdentifier.getBytes());
oIDOS.write(0);
oIDOS.write(m_abyIdentifier);
|