FrameBodyOWNEpublic class FrameBodyOWNE extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBodyOwnership frame.
The ownership frame might be used as a reminder of a made transaction
or, if signed, as proof. Note that the "USER" and "TOWN" frames are
good to use in conjunction with this one. The frame begins, after the
frame ID, size and encoding fields, with a 'price payed' field. The
first three characters of this field contains the currency used for
the transaction, encoded according to ISO-4217 alphabetic
currency code. Concatenated to this is the actual price payed, as a
numerical string using "." as the decimal separator. Next is an 8
character date string (YYYYMMDD) followed by a string with the name
of the seller as the last field in the frame. There may only be one
"OWNE" frame in a tag.
<Header for 'Ownership frame', ID: "OWNE"> |
Text encoding | $xx |
Price payed | <text string> $00 |
Date of purch. | <text string> |
Seller | <text string according to encoding> |
For more details, please refer to the ID3 specifications:
|
Constructors Summary |
---|
public FrameBodyOWNE()Creates a new FrameBodyOWNE datatype.
// this.setObject("Text Encoding", new Byte((byte) 0));
// this.setObject("Price Paid", "");
// this.setObject("Date Of Purchase", "");
// this.setObject("Seller", "");
| public FrameBodyOWNE(FrameBodyOWNE body)
super(body);
| public FrameBodyOWNE(byte textEncoding, String pricePaid, String dateOfPurchase, String seller)Creates a new FrameBodyOWNE datatype.
this.setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
this.setObjectValue(DataTypes.OBJ_PRICE_PAID, pricePaid);
this.setObjectValue(DataTypes.OBJ_PURCHASE_DATE, dateOfPurchase);
this.setObjectValue(DataTypes.OBJ_SELLER_NAME, seller);
| public FrameBodyOWNE(ByteBuffer byteBuffer, int frameSize)Creates a new FrameBodyOWNE datatype.
super(byteBuffer, frameSize);
|
Methods Summary |
---|
public java.lang.String | getIdentifier()The ID3v2 frame identifier
return ID3v24Frames.FRAME_ID_OWNERSHIP;
| protected void | setupObjectList()
objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE));
objectList.add(new StringNullTerminated(DataTypes.OBJ_PRICE_PAID, this));
objectList.add(new StringDate(DataTypes.OBJ_PURCHASE_DATE, this));
objectList.add(new TextEncodedStringSizeTerminated(DataTypes.OBJ_SELLER_NAME, this));
| public void | write(java.io.ByteArrayOutputStream tagBuffer)If the seller name cannot be encoded using current encoder, change the encoder
//Ensure valid for type
setTextEncoding(ID3TextEncodingConversion.getTextEncoding(getHeader(), getTextEncoding()));
//Ensure valid for data
if (!((AbstractString) getObject(DataTypes.OBJ_SELLER_NAME)).canBeEncoded())
{
this.setTextEncoding(ID3TextEncodingConversion.getUnicodeTextEncoding(getHeader()));
}
super.write(tagBuffer);
|
|