Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitAENCID3V2Frame(this);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof AENCID3V2Frame)))
{
return false;
}
AENCID3V2Frame oOtherAENC = (AENCID3V2Frame)oOther;
return (m_sOwnerIdentifier.equals(oOtherAENC.m_sOwnerIdentifier) &&
(m_iPreviewStartFrame == oOtherAENC.m_iPreviewStartFrame) &&
(m_iPreviewLengthFrames == oOtherAENC.m_iPreviewLengthFrames) &&
Arrays.equals(m_abyEncryptionInfo, oOtherAENC.m_abyEncryptionInfo));
|
public byte[] | getEncryptionInfo()Get additional encryption info required for the particular method used.
return m_abyEncryptionInfo;
|
protected byte[] | getFrameId()
return "AENC".getBytes();
|
public java.lang.String | getOwnerIdentifier()Get the owner identifier for the encryption described in this frame.
return m_sOwnerIdentifier;
|
public int | getPreviewFramesLength()Get the length in frames of the preview section of this file.
return m_iPreviewLengthFrames;
|
public int | getPreviewStartFrame()Get the starting frame of the unencrypted preview section of this file.
return m_iPreviewStartFrame;
|
public void | setEncryptionInfo(byte[] abyEncryptionInfo)Set any additional encryption info which will be required for the decryption of this file, based
on the particular encryption method in use.
m_abyEncryptionInfo = abyEncryptionInfo;
if (m_abyEncryptionInfo == null)
{
m_abyEncryptionInfo = new byte[0];
}
|
public void | setOwnerIdentifier(java.lang.String sOwnerIdentifier)Set the owner identifier for the encryption described in this frame.
String sOrigOwnerIdentifier = m_sOwnerIdentifier;
m_sOwnerIdentifier = sOwnerIdentifier;
if (m_sOwnerIdentifier == null)
{
m_sOwnerIdentifier = "";
}
// try this update, and reverse it if it generates and error
try
{
notifyID3Observers();
}
catch (ID3Exception e)
{
m_sOwnerIdentifier = sOrigOwnerIdentifier;
throw e;
}
|
public void | setPreviewRange(int iPreviewStartFrame, int iPreviewLengthFrames)Set the range of the unencrypted preview section of this file.
if ((iPreviewStartFrame < 0) || (iPreviewStartFrame > 65535) ||
(iPreviewLengthFrames < 0) || (iPreviewLengthFrames > 65535))
{
throw new ID3Exception("Preview start frame and frames length must be unsigned 16-bit integer values.");
}
m_iPreviewStartFrame = iPreviewStartFrame;
m_iPreviewLengthFrames = iPreviewLengthFrames;
|
public java.lang.String | toString()
return "Audio encryption: Owner identifier=[" + m_sOwnerIdentifier + "], Preview start frame = " +
m_iPreviewStartFrame + ", Preview length = " + m_iPreviewLengthFrames + ", Encryption info=[" +
ID3Util.convertBytesToHexString(m_abyEncryptionInfo, true) + "]";
|
protected void | writeBody(ID3DataOutputStream oIDOS)
// owner information
oIDOS.write(m_sOwnerIdentifier.getBytes());
oIDOS.writeUnsignedByte(0);
// preview start frame
oIDOS.writeBEUnsigned16(m_iPreviewStartFrame);
// preview length in frames
oIDOS.writeBEUnsigned16(m_iPreviewLengthFrames);
// encryption info
oIDOS.write(m_abyEncryptionInfo);
|