FileDocCategorySizeDatePackage
FrameBodyTXXX.javaAPI DocJaudiotagger 2.0.47658Mon Sep 26 14:18:58 BST 2011org.jaudiotagger.tag.id3.framebody

FrameBodyTXXX

public class FrameBodyTXXX extends AbstractFrameBodyTextInfo implements ID3v24FrameBody, ID3v23FrameBody
User defined text information frame

This frame is intended for one-string text information concerning the audio file in a similar way to the other "T"-frames. The frame body consists of a description of the string, represented as a terminated string, followed by the actual string. There may be more than one "TXXX" frame in each tag, but only one with the same description.

Text encoding $xx Description $00 (00) Value

Fields Summary
public static final String
MUSICBRAINZ_ARTISTID
public static final String
MUSICBRAINZ_ALBUM_ARTISTID
public static final String
MUSICBRAINZ_ALBUMID
public static final String
MUSICBRAINZ_ORIGINAL_ALBUMID
public static final String
MUSICBRAINZ_RELEASE_GROUPID
public static final String
MUSICBRAINZ_DISCID
public static final String
MUSICBRAINZ_ALBUM_TYPE
public static final String
MUSICBRAINZ_ALBUM_STATUS
public static final String
MUSICBRAINZ_ALBUM_COUNTRY
public static final String
MUSICBRAINZ_WORKID
public static final String
AMAZON_ASIN
public static final String
MUSICIP_ID
public static final String
BARCODE
public static final String
CATALOG_NO
public static final String
MOOD
public static final String
TAGS
public static final String
FBPM
public static final String
SCRIPT
public static final String
ARTISTS
public static final String
ACOUSTID_FINGERPRINT
public static final String
ACOUSTID_ID
public static final String
COUNTRY
public static final String
ALBUM_ARTIST
public static final String
PERFORMER
Constructors Summary
public FrameBodyTXXX()
Creates a new FrameBodyTXXX datatype.


              
     
    
        this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, TextEncoding.ISO_8859_1);
        this.setObjectValue(DataTypes.OBJ_DESCRIPTION, "");
        this.setObjectValue(DataTypes.OBJ_TEXT, "");

    
public FrameBodyTXXX(FrameBodyTMOO body)
Convert from V4 TMOO Frame to V3 Frame

param
body

        setObjectValue(DataTypes.OBJ_TEXT_ENCODING, body.getTextEncoding());
        this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, TextEncoding.ISO_8859_1);
        this.setObjectValue(DataTypes.OBJ_DESCRIPTION, MOOD);
        this.setObjectValue(DataTypes.OBJ_TEXT, body.getText());
    
public FrameBodyTXXX(FrameBodyTXXX body)

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

param
textEncoding
param
description
param
text

        this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
        this.setObjectValue(DataTypes.OBJ_DESCRIPTION, description);
        this.setObjectValue(DataTypes.OBJ_TEXT, text);
    
public FrameBodyTXXX(ByteBuffer byteBuffer, int frameSize)
Creates a new FrameBodyTXXX datatype.

param
byteBuffer
param
frameSize
throws
InvalidTagException

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

return
the description field

        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_INFO;
    
public voidsetDescription(java.lang.String description)
Set the description field

param
description

        setObjectValue(DataTypes.OBJ_DESCRIPTION, description);
    
protected voidsetupObjectList()
This is different to other text Frames

        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 TextEncodedStringSizeTerminated(DataTypes.OBJ_TEXT, this));
    
public voidwrite(java.io.ByteArrayOutputStream tagBuffer)
Because TXXX frames also have a text encoded description we need to check this as well. *

        //Ensure valid for type
        setTextEncoding(ID3TextEncodingConversion.getTextEncoding(getHeader(), getTextEncoding()));

        //Ensure valid for description
        if (!((TextEncodedStringNullTerminated) getObject(DataTypes.OBJ_DESCRIPTION)).canBeEncoded())
        {
            this.setTextEncoding(ID3TextEncodingConversion.getUnicodeTextEncoding(getHeader()));
        }
        super.write(tagBuffer);