FrameBodyUSERpublic class FrameBodyUSER extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBodyTerms of use frame.
This frame contains a brief description of the terms of use and
ownership of the file. More detailed information concerning the legal
terms might be available through the "WCOP" frame. Newlines are
allowed in the text. There may only be one "USER" frame in a tag.
<Header for 'Terms of use frame', ID: "USER"> |
Text encoding | $xx |
Language | $xx xx xx |
The actual text | <text string according to encoding> |
For more details, please refer to the ID3 specifications:
|
Constructors Summary |
---|
public FrameBodyUSER()Creates a new FrameBodyUSER datatype.
// setObject("Text Encoding", new Byte((byte) 0));
// setObject("Language", "");
// setObject("Text", "");
| public FrameBodyUSER(FrameBodyUSER body)
super(body);
| public FrameBodyUSER(byte textEncoding, String language, String text)Creates a new FrameBodyUSER datatype.
setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
setObjectValue(DataTypes.OBJ_LANGUAGE, language);
setObjectValue(DataTypes.OBJ_TEXT, text);
| public FrameBodyUSER(ByteBuffer byteBuffer, int frameSize)Create a new FrameBodyUser by reading from byte buffer
super(byteBuffer, frameSize);
|
Methods Summary |
---|
public java.lang.String | getIdentifier()The ID3v2 frame identifier
return ID3v24Frames.FRAME_ID_TERMS_OF_USE;
| public java.lang.String | getLanguage()
return (String) getObjectValue(DataTypes.OBJ_LANGUAGE);
| public void | setOwner(java.lang.String language)
setObjectValue(DataTypes.OBJ_LANGUAGE, language);
| protected void | setupObjectList()
objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE));
objectList.add(new StringHashMap(DataTypes.OBJ_LANGUAGE, this, Languages.LANGUAGE_FIELD_SIZE));
objectList.add(new StringSizeTerminated(DataTypes.OBJ_TEXT, this));
| public void | write(java.io.ByteArrayOutputStream tagBuffer)If the text cannot be encoded using current encoder, change the encoder
if (!((AbstractString) getObject(DataTypes.OBJ_TEXT)).canBeEncoded())
{
this.setTextEncoding(TextEncoding.UTF_16);
}
super.write(tagBuffer);
|
|