FileDocCategorySizeDatePackage
FrameBodyUFID.javaAPI DocJaudiotagger 2.0.44212Wed Mar 30 16:12:04 BST 2011org.jaudiotagger.tag.id3.framebody

FrameBodyUFID

public class FrameBodyUFID extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
A UFID Framebody consists of an owner that identifies the server hosting the unique identifier database, and the unique identifier itself which can be up to 64 bytes in length.

Fields Summary
public static final String
UFID_MUSICBRAINZ
public static final String
UFID_ID3TEST
Constructors Summary
public FrameBodyUFID()
Creates a new FrameBodyUFID datatype.


              
     
    
        setOwner("");
        setUniqueIdentifier(new byte[0]);
    
public FrameBodyUFID(FrameBodyUFID body)

        super(body);
    
public FrameBodyUFID(String owner, byte[] uniqueIdentifier)
Creates a new FrameBodyUFID datatype.

param
owner url of the database
param
uniqueIdentifier unique identifier

        setOwner(owner);
        setUniqueIdentifier(uniqueIdentifier);
    
public FrameBodyUFID(ByteBuffer byteBuffer, int frameSize)
Creates FrameBodyUFID datatype from buffer

param
byteBuffer
param
frameSize
throws
InvalidTagException

        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_UNIQUE_FILE_ID;
    
public java.lang.StringgetOwner()

return
the url of the the database that this ufid is stored in

        return (String) getObjectValue(DataTypes.OBJ_OWNER);
    
public byte[]getUniqueIdentifier()

return
the unique identifier (within the owners domain)

        return (byte[]) getObjectValue(DataTypes.OBJ_DATA);
    
public voidsetOwner(java.lang.String owner)
Set the owner of url of the the database that this ufid is stored in

param
owner should be a valid url

        setObjectValue(DataTypes.OBJ_OWNER, owner);
    
public voidsetUniqueIdentifier(byte[] uniqueIdentifier)
Set the unique identifier (within the owners domain)

param
uniqueIdentifier

        setObjectValue(DataTypes.OBJ_DATA, uniqueIdentifier);
    
protected voidsetupObjectList()

        objectList.add(new StringNullTerminated(DataTypes.OBJ_OWNER, this));
        objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this));