FrameBodyGEOBpublic class FrameBodyGEOB extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBodyGeneral encapsulated object frame.
In this frame any type of file can be encapsulated. After the header,
'Frame size' and 'Encoding' follows 'MIME type' represented as
as a terminated string encoded with ISO-8859-1. The
filename is case sensitive and is encoded as 'Encoding'. Then follows
a content description as terminated string, encoded as 'Encoding'.
The last thing in the frame is the actual object. The first two
strings may be omitted, leaving only their terminations. There may be more than one "GEOB"
frame in each tag, but only one with the same content descriptor.
<Header for 'General encapsulated object', ID: "GEOB"> |
Text encoding | $xx |
MIME type | <text string> $00 |
Filename | <text string according to encoding> $00 (00) |
Content description | $00 (00) |
Encapsulated object | <binary data> |
For more details, please refer to the ID3 specifications:
|
Constructors Summary |
---|
public FrameBodyGEOB()Creates a new FrameBodyGEOB datatype.
this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, TextEncoding.ISO_8859_1);
this.setObjectValue(DataTypes.OBJ_MIME_TYPE, "");
this.setObjectValue(DataTypes.OBJ_FILENAME, "");
this.setObjectValue(DataTypes.OBJ_DESCRIPTION, "");
this.setObjectValue(DataTypes.OBJ_DATA, new byte[0]);
| public FrameBodyGEOB(FrameBodyGEOB body)
super(body);
| public FrameBodyGEOB(byte textEncoding, String mimeType, String filename, String description, byte[] object)Creates a new FrameBodyGEOB datatype.
this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
this.setObjectValue(DataTypes.OBJ_MIME_TYPE, mimeType);
this.setObjectValue(DataTypes.OBJ_FILENAME, filename);
this.setObjectValue(DataTypes.OBJ_DESCRIPTION, description);
this.setObjectValue(DataTypes.OBJ_DATA, object);
| public FrameBodyGEOB(ByteBuffer byteBuffer, int frameSize)Creates a new FrameBodyGEOB datatype.
super(byteBuffer, frameSize);
|
Methods Summary |
---|
public java.lang.String | getDescription()
return (String) getObjectValue(DataTypes.OBJ_DESCRIPTION);
| public java.lang.String | getIdentifier()
return ID3v24Frames.FRAME_ID_GENERAL_ENCAPS_OBJECT;
| public void | setDescription(java.lang.String description)
setObjectValue(DataTypes.OBJ_DESCRIPTION, description);
| protected void | setupObjectList()
objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE));
objectList.add(new StringNullTerminated(DataTypes.OBJ_MIME_TYPE, this));
objectList.add(new TextEncodedStringNullTerminated(DataTypes.OBJ_FILENAME, this));
objectList.add(new TextEncodedStringNullTerminated(DataTypes.OBJ_DESCRIPTION, this));
objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this));
| public void | write(java.io.ByteArrayOutputStream tagBuffer)If the filename or description cannot be encoded using current encoder, change the encoder
if (!((AbstractString) getObject(DataTypes.OBJ_FILENAME)).canBeEncoded())
{
this.setTextEncoding(TextEncoding.UTF_16);
}
if (!((AbstractString) getObject(DataTypes.OBJ_DESCRIPTION)).canBeEncoded())
{
this.setTextEncoding(TextEncoding.UTF_16);
}
super.write(tagBuffer);
|
|