FileDocCategorySizeDatePackage
FrameBodyENCR.javaAPI DocJaudiotagger 2.0.45101Wed Mar 30 16:12:02 BST 2011org.jaudiotagger.tag.id3.framebody

FrameBodyENCR

public class FrameBodyENCR extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
Encryption method registration frame.

To identify with which method a frame has been encrypted the encryption method must be registered in the tag with this frame. The 'Owner identifier' is a null-terminated string with a URL containing an email address, or a link to a location where an email address can be found, that belongs to the organisation responsible for this specific encryption method. Questions regarding the encryption method should be sent to the indicated email address. The 'Method symbol' contains a value that is associated with this method throughout the whole tag. Values below $80 are reserved. The 'Method symbol' may optionally be followed by encryption specific data. There may be several "ENCR" frames in a tag but only one containing the same symbol and only one containing the same owner identifier. The method must be used somewhere in the tag. See section 3.3.1, flag j for more information.

<Header for 'Encryption method registration', ID: "ENCR">
Owner identifier<text string> $00
Method symbol $xx
Encryption data <binary data>

For more details, please refer to the ID3 specifications:

author
: Paul Taylor
author
: Eric Farng
version
$Id: FrameBodyENCR.java 857 2009-12-03 11:21:11Z paultaylor $

Fields Summary
Constructors Summary
public FrameBodyENCR()
Creates a new FrameBodyENCR datatype.

        this.setObjectValue(DataTypes.OBJ_OWNER, "");
        this.setObjectValue(DataTypes.OBJ_METHOD_SYMBOL, (byte) 0);
        this.setObjectValue(DataTypes.OBJ_ENCRYPTION_INFO, new byte[0]);
    
public FrameBodyENCR(FrameBodyENCR body)

        super(body);
    
public FrameBodyENCR(String owner, byte methodSymbol, byte[] data)
Creates a new FrameBodyENCR datatype.

param
owner
param
methodSymbol
param
data

        this.setObjectValue(DataTypes.OBJ_OWNER, owner);
        this.setObjectValue(DataTypes.OBJ_METHOD_SYMBOL, methodSymbol);
        this.setObjectValue(DataTypes.OBJ_ENCRYPTION_INFO, data);
    
public FrameBodyENCR(ByteBuffer byteBuffer, int frameSize)
Creates a new FrameBodyENCR datatype.

param
byteBuffer
param
frameSize
throws
InvalidTagException if unable to create framebody from buffer

        super(byteBuffer, frameSize);
    
Methods Summary
public java.lang.StringgetIdentifier()
The ID3v2 frame identifier

return
the ID3v2 frame identifier for this frame type

        return ID3v24Frames.FRAME_ID_ENCRYPTION;
    
public java.lang.StringgetOwner()

return

        return (String) getObjectValue(DataTypes.OBJ_OWNER);
    
public voidsetOwner(java.lang.String owner)

param
owner

        setObjectValue(DataTypes.OBJ_OWNER, owner);
    
protected voidsetupObjectList()

        objectList.add(new StringNullTerminated(DataTypes.OBJ_OWNER, this));
        objectList.add(new NumberFixedLength(DataTypes.OBJ_METHOD_SYMBOL, this, 1));
        objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_ENCRYPTION_INFO, this));