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

FrameBodyAENC

public class FrameBodyAENC extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
Audio encryption Frame.

This frame indicates if the actual audio stream is encrypted, and by whom. Since standardisation of such encrypion scheme is beyond this document, all "AENC" frames begin with a 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 encrypted audio file. Questions regarding the encrypted audio should be sent to the email address specified. If a $00 is found directly after the 'Frame size' and the audiofile indeed is encrypted, the whole file may be considered useless.

After the 'Owner identifier', a pointer to an unencrypted part of the audio can be specified. The 'Preview start' and 'Preview length' is described in frames. If no part is unencrypted, these fields should be left zeroed. After the 'preview length' field follows optionally a datablock required for decryption of the audio. There may be more than one "AENC" frames in a tag, but only one with the same 'Owner identifier'.

<Header for 'Audio encryption', ID: "AENC">
Owner identifier <text string> $00
Preview start $xx xx
Preview length $xx xx
Encryption info <binary data>

For more details, please refer to the ID3 specifications:

author
: Paul Taylor
author
: Eric Farng
version
$Id: FrameBodyAENC.java 832 2009-11-12 13:25:38Z paultaylor $

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

        this.setObjectValue(DataTypes.OBJ_OWNER, "");
        this.setObjectValue(DataTypes.OBJ_PREVIEW_START, (short) 0);
        this.setObjectValue(DataTypes.OBJ_PREVIEW_LENGTH, (short) 0);
        this.setObjectValue(DataTypes.OBJ_ENCRYPTION_INFO, new byte[0]);
    
public FrameBodyAENC(FrameBodyAENC body)

        super(body);
    
public FrameBodyAENC(String owner, short previewStart, short previewLength, byte[] data)
Creates a new FrameBodyAENC datatype.

param
owner
param
previewStart
param
previewLength
param
data

        this.setObjectValue(DataTypes.OBJ_OWNER, owner);
        this.setObjectValue(DataTypes.OBJ_PREVIEW_START, previewStart);
        this.setObjectValue(DataTypes.OBJ_PREVIEW_LENGTH, previewLength);
        this.setObjectValue(DataTypes.OBJ_ENCRYPTION_INFO, data);
    
public FrameBodyAENC(ByteBuffer byteBuffer, int frameSize)
Creates a new FrameBodyAENC 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_AUDIO_ENCRYPTION;
    
public java.lang.StringgetOwner()

return
owner

        return (String) getObjectValue(DataTypes.OBJ_OWNER);
    
public voidgetOwner(java.lang.String description)

param
description

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

        objectList.add(new StringNullTerminated(DataTypes.OBJ_OWNER, this));
        objectList.add(new NumberFixedLength(DataTypes.OBJ_PREVIEW_START, this, 2));
        objectList.add(new NumberFixedLength(DataTypes.OBJ_PREVIEW_LENGTH, this, 2));
        objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_ENCRYPTION_INFO, this));