public class FrameBodyCOMR extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
The price string is followed by an 8 character date string in the format YYYYMMDD, describing for how long the price is valid. After that is a contact URL, with which the user can contact the seller, followed by a one byte 'received as' field. It describes how the audio is delivered when bought according to the following list:
$00 | Other |
$01 | Standard CD album with other songs |
$02 | Compressed audio on CD |
$03 | File over the Internet |
$04 | Stream over the Internet |
$05 | As note sheets |
$06 | As note sheets in a book with other sheets |
$07 | Music on other media |
$08 | Non-musical merchandise |
Next follows a terminated string with the name of the seller followed by a terminated string with a short description of the product. The last thing is the ability to include a company logotype. The first of them is the 'Picture MIME type' field containing information about which picture format is used. In the event that the MIME media type name is omitted, "image/" will be implied. Currently only "image/png" and "image/jpeg" are allowed. This format string is followed by the binary picture data. This two last fields may be omitted if no picture is to attach.
<Header for 'Commercial frame', ID: "COMR"> | |
Text encoding | $xx |
Price string | <text string> $00 |
Valid until | <text string> |
Contact URL | <text string> $00 |
Received as | $xx |
Name of seller | <text string according to encoding> $00 (00) |
Description | <text string according to encoding> $00 (00) |
Picture MIME type | <string> $00 |
Seller logo | <binary data> |
For more details, please refer to the ID3 specifications:
TYPE_BODY
objectList
logger
Constructor and Description |
---|
FrameBodyCOMR()
Creates a new FrameBodyCOMR datatype.
|
FrameBodyCOMR(ByteBuffer byteBuffer,
int frameSize)
Creates a new FrameBodyCOMR datatype.
|
FrameBodyCOMR(byte textEncoding,
String priceString,
String validUntil,
String contactUrl,
byte recievedAs,
String nameOfSeller,
String description,
String mimeType,
byte[] sellerLogo)
Creates a new FrameBodyCOMR datatype.
|
FrameBodyCOMR(FrameBodyCOMR body) |
Modifier and Type | Method and Description |
---|---|
String |
getIdentifier()
The ID3v2 frame identifier
|
String |
getOwner() |
void |
getOwner(String description) |
protected void |
setupObjectList()
Create the list of Datatypes that this body
expects in the correct order This method needs to be implemented by concrete subclasses
|
void |
write(ByteArrayOutputStream tagBuffer)
If the seller or description cannot be encoded using current encoder, change the encoder
|
createStructure, equals, getSize, read, setSize, setSize
getBriefDescription, getHeader, getLongDescription, getObject, getObjectValue, getTextEncoding, getUserFriendlyValue, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString
public FrameBodyCOMR()
public FrameBodyCOMR(FrameBodyCOMR body)
public FrameBodyCOMR(byte textEncoding, String priceString, String validUntil, String contactUrl, byte recievedAs, String nameOfSeller, String description, String mimeType, byte[] sellerLogo)
textEncoding
- priceString
- validUntil
- contactUrl
- recievedAs
- nameOfSeller
- description
- mimeType
- sellerLogo
- public FrameBodyCOMR(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
- InvalidTagException
- if unable to create framebody from bufferpublic String getIdentifier()
getIdentifier
in class AbstractID3v2FrameBody
public String getOwner()
public void getOwner(String description)
description
- public void write(ByteArrayOutputStream tagBuffer)
write
in class AbstractID3v2FrameBody
protected void setupObjectList()
AbstractTagFrameBody
setupObjectList
in class AbstractTagFrameBody
Copyright © 2005–2020 jthink.net. All rights reserved.