org.farng.mp3.id3
Class FrameBodyCOMR

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
      extended by org.farng.mp3.AbstractMP3FragmentBody
          extended by org.farng.mp3.id3.AbstractID3v2FrameBody
              extended by org.farng.mp3.id3.FrameBodyCOMR
All Implemented Interfaces:
MP3MetadataContainer

public class FrameBodyCOMR
extends AbstractID3v2FrameBody

4.24.   Commercial frame

   This frame enables several competing offers in the same tag by

   bundling all needed information. That makes this frame rather complex
   but it's an easier solution than if one tries to achieve the same
   result with several frames. The frame begins, after the frame ID,
   size and encoding fields, with a price string field. A price is
   constructed by one three character currency code, encoded according

   to ISO 4217 [ISO-4217] alphabetic currency code, followed by a
   numerical value where "." is used as decimal separator. In the price
   string several prices may be concatenated, separated by a "/"
   character, but there may only be one currency of each type.

   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 attached. There may be more than one 'commercial frame' in
   a tag, but no two may be identical.

     <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>

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
FrameBodyCOMR()
          Creates a new FrameBodyCOMR object.
FrameBodyCOMR(byte textEncoding, java.lang.String priceString, java.lang.String validUntil, java.lang.String contactUrl, byte recievedAs, java.lang.String nameOfSeller, java.lang.String description, java.lang.String mimeType, byte[] sellerLogo)
          Creates a new FrameBodyCOMR object.
FrameBodyCOMR(FrameBodyCOMR body)
          Creates a new FrameBodyCOMR object.
FrameBodyCOMR(java.io.RandomAccessFile file)
          Creates a new FrameBodyCOMR object.
 
Method Summary
 java.lang.String getIdentifier()
           
 java.lang.String getOwner()
           
 void getOwner(java.lang.String description)
           
protected  void setupObjectList()
          Create the order of MP3Object objects that this body expects.
 
Methods inherited from class org.farng.mp3.id3.AbstractID3v2FrameBody
equals, readHeader, writeHeader
 
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody
appendToObjectList, getBriefDescription, getDescription, getObject, getObjectListIterator, getSize, has6ByteHeader, isSubsetOf, iterator, read, setObject, toString, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameBodyCOMR

public FrameBodyCOMR()
Creates a new FrameBodyCOMR object.


FrameBodyCOMR

public FrameBodyCOMR(FrameBodyCOMR body)
Creates a new FrameBodyCOMR object.


FrameBodyCOMR

public FrameBodyCOMR(byte textEncoding,
                     java.lang.String priceString,
                     java.lang.String validUntil,
                     java.lang.String contactUrl,
                     byte recievedAs,
                     java.lang.String nameOfSeller,
                     java.lang.String description,
                     java.lang.String mimeType,
                     byte[] sellerLogo)
Creates a new FrameBodyCOMR object.


FrameBodyCOMR

public FrameBodyCOMR(java.io.RandomAccessFile file)
              throws java.io.IOException,
                     InvalidTagException
Creates a new FrameBodyCOMR object.

Throws:
java.io.IOException
InvalidTagException
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Specified by:
getIdentifier in class AbstractMP3FileItem

getOwner

public java.lang.String getOwner()

getOwner

public void getOwner(java.lang.String description)

setupObjectList

protected void setupObjectList()
Description copied from class: AbstractMP3FragmentBody
Create the order of MP3Object objects that this body expects. This method needs to be overwritten.

Specified by:
setupObjectList in class AbstractMP3FragmentBody