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

FrameBodyWXXX

public class FrameBodyWXXX extends AbstractFrameBodyUrlLink implements ID3v24FrameBody, ID3v23FrameBody
Represents a user defined url

Fields Summary
public static final String
URL_DISCOGS_RELEASE_SITE
public static final String
URL_WIKIPEDIA_RELEASE_SITE
public static final String
URL_OFFICIAL_RELEASE_SITE
public static final String
URL_DISCOGS_ARTIST_SITE
public static final String
URL_WIKIPEDIA_ARTIST_SITE
public static final String
URL_LYRICS_SITE
Constructors Summary
public FrameBodyWXXX()
Creates a new FrameBodyWXXX datatype.


              
     
    
        this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, TextEncoding.ISO_8859_1);
        this.setObjectValue(DataTypes.OBJ_DESCRIPTION, "");
        this.setObjectValue(DataTypes.OBJ_URLLINK, "");
    
public FrameBodyWXXX(FrameBodyWXXX body)

        super(body);
    
public FrameBodyWXXX(byte textEncoding, String description, String urlLink)
Creates a new FrameBodyWXXX datatype.

param
textEncoding
param
description
param
urlLink

        this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
        this.setObjectValue(DataTypes.OBJ_DESCRIPTION, description);
        this.setObjectValue(DataTypes.OBJ_URLLINK, urlLink);
    
public FrameBodyWXXX(ByteBuffer byteBuffer, int frameSize)
Creates a new FrameBodyWXXX datatype by reading from file.

param
byteBuffer
param
frameSize
throws
InvalidTagException

        super(byteBuffer, frameSize);
    
Methods Summary
public java.lang.StringgetDescription()

return
a description of the hyperlink

        return (String) getObjectValue(DataTypes.OBJ_DESCRIPTION);
    
public java.lang.StringgetIdentifier()
The ID3v2 frame identifier

return
the ID3v2 frame identifier for this frame type

        return ID3v24Frames.FRAME_ID_USER_DEFINED_URL;
    
public voidsetDescription(java.lang.String description)
Set a description of the hyperlink

param
description

        setObjectValue(DataTypes.OBJ_DESCRIPTION, description);
    
protected voidsetupObjectList()
This is different ot other URL Links

        objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE));
        objectList.add(new TextEncodedStringNullTerminated(DataTypes.OBJ_DESCRIPTION, this));
        objectList.add(new StringSizeTerminated(DataTypes.OBJ_URLLINK, this));
    
public voidwrite(java.io.ByteArrayOutputStream tagBuffer)
If the description cannot be encoded using the current encoding change the encoder

        if (!((AbstractString) getObject(DataTypes.OBJ_DESCRIPTION)).canBeEncoded())
        {
            this.setTextEncoding(TextEncoding.UTF_16);
        }
        super.write(tagBuffer);