org.blinkenlights.jid3.v2
Class COMRID3V2Frame

java.lang.Object
  extended byorg.blinkenlights.jid3.v2.ID3V2Frame
      extended byorg.blinkenlights.jid3.v2.COMRID3V2Frame
All Implemented Interfaces:
ID3Subject, ID3Visitable

public class COMRID3V2Frame
extends ID3V2Frame


Field Summary
static byte RECEIVED_AS_COMPRESSED_AUDIO_ON_CD
           
static byte RECEIVED_AS_FILE_OVER_THE_INTERNET
           
static byte RECEIVED_AS_MUSIC_ON_OTHER_MEDIA
           
static byte RECEIVED_AS_NON_MUSICAL_MERCHANDISE
           
static byte RECEIVED_AS_NOTE_SHEETS
           
static byte RECEIVED_AS_NOTE_SHEETS_IN_A_BOOK_WITH_OTHER_SHEETS
           
static byte RECEIVED_AS_OTHER
           
static byte RECEIVED_AS_STANDARD_ALBUM
           
static byte RECEIVED_AS_STREAM_OVER_THE_INTERNET
           
 
Constructor Summary
COMRID3V2Frame(java.io.InputStream oIS)
           
COMRID3V2Frame(java.lang.String sPrice, java.lang.String sValidUntil, java.lang.String sContactUrl, byte byReceivedAs, java.lang.String sNameOfSeller, java.lang.String sDescription, java.lang.String sPictureMimeType, byte[] abySellerLogoData)
          Constructor.
 
Method Summary
 void accept(ID3Visitor oID3Visitor)
          Accept a visitor.
 boolean equals(java.lang.Object oOther)
           
 java.lang.String getContactUrl()
          Get contact URL string.
 java.lang.String getDescription()
          Get description of item.
protected  byte[] getFrameId()
          Get the four bytes which uniquely specify of which type this frame is.
 java.lang.String getNameOfSeller()
          Get name of seller.
 java.lang.String getPrice()
          Get price.
 byte getReceivedAsFormat()
          Get received as format.
 byte[] getSellerLogoData()
          Get image data for the seller logo.
 java.lang.String getSellerLogoMimeType()
          Get mime type of the seller logo image.
 TextEncoding getTextEncoding()
          Get the text encoding used for the name of seller and description in this frame.
 java.lang.String getValidUntilDate()
          Get valid until date.
 void setCommercialInformation(java.lang.String sPrice, java.lang.String sValidUntil, java.lang.String sContactUrl, byte byReceivedAs, java.lang.String sNameOfSeller, java.lang.String sDescription, java.lang.String sPictureMimeType, byte[] abySellerLogoData)
          Set commercial information.
 void setTextEncoding(TextEncoding oTextEncoding)
          Set the text encoding to be used for the name of seller and description in this frame.
 java.lang.String toString()
          Represent the contents of this frame as a string.
protected  void writeBody(ID3DataOutputStream oIDOS)
          Write the body of the frame to an ID3 data output stream.
 
Methods inherited from class org.blinkenlights.jid3.v2.ID3V2Frame
addID3Observer, getEncryptionMethod, isEncrypted, notifyID3Observers, removeID3Observer, setCompressionFlag, setEncryption, setFileAlterPreservationFlag, setGroupingIdentityFlag, setReadOnlyFlag, setTagAlterPreservationFlag, write, writeHeader
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RECEIVED_AS_OTHER

public static final byte RECEIVED_AS_OTHER
See Also:
Constant Field Values

RECEIVED_AS_STANDARD_ALBUM

public static final byte RECEIVED_AS_STANDARD_ALBUM
See Also:
Constant Field Values

RECEIVED_AS_COMPRESSED_AUDIO_ON_CD

public static final byte RECEIVED_AS_COMPRESSED_AUDIO_ON_CD
See Also:
Constant Field Values

RECEIVED_AS_FILE_OVER_THE_INTERNET

public static final byte RECEIVED_AS_FILE_OVER_THE_INTERNET
See Also:
Constant Field Values

RECEIVED_AS_STREAM_OVER_THE_INTERNET

public static final byte RECEIVED_AS_STREAM_OVER_THE_INTERNET
See Also:
Constant Field Values

RECEIVED_AS_NOTE_SHEETS

public static final byte RECEIVED_AS_NOTE_SHEETS
See Also:
Constant Field Values

RECEIVED_AS_NOTE_SHEETS_IN_A_BOOK_WITH_OTHER_SHEETS

public static final byte RECEIVED_AS_NOTE_SHEETS_IN_A_BOOK_WITH_OTHER_SHEETS
See Also:
Constant Field Values

RECEIVED_AS_MUSIC_ON_OTHER_MEDIA

public static final byte RECEIVED_AS_MUSIC_ON_OTHER_MEDIA
See Also:
Constant Field Values

RECEIVED_AS_NON_MUSICAL_MERCHANDISE

public static final byte RECEIVED_AS_NON_MUSICAL_MERCHANDISE
See Also:
Constant Field Values
Constructor Detail

COMRID3V2Frame

public COMRID3V2Frame(java.lang.String sPrice,
                      java.lang.String sValidUntil,
                      java.lang.String sContactUrl,
                      byte byReceivedAs,
                      java.lang.String sNameOfSeller,
                      java.lang.String sDescription,
                      java.lang.String sPictureMimeType,
                      byte[] abySellerLogoData)
               throws ID3Exception
Constructor.

Parameters:
sPrice - a price(s) string (a price string consists of a three letter ISO-4217 currency code, followed by an amount, where "." is used as the decimal separator). Multiple prices may be separated by a "/" characters.
sValidUntil - the date the prices offer is valid until, in the format YYYYMMDD
sContactUrl - an URL at which contact can be made with the seller
byReceivedAs - byte specifying how the track will be delivered when purchased
sNameOfSeller - the name of the seller
sDescription - short description of the product
sPictureMimeType - the mime type of the picture (only "image/jpeg" and "image/png" are allowed by the ID3 specification)
abySellerLogoData - the image data containing the seller's logo
Throws:
ID3Exception - if sPrice is null or invalid
ID3Exception - if sValidUntil is null or invalid
ID3Exception - if sContactUrl is null
ID3Exception - if sNameOfSeller is null
ID3Exception - if sDecription is null

COMRID3V2Frame

public COMRID3V2Frame(java.io.InputStream oIS)
               throws ID3Exception
Method Detail

accept

public void accept(ID3Visitor oID3Visitor)
Description copied from interface: ID3Visitable
Accept a visitor.

Parameters:
oID3Visitor - a visitor of this object

setCommercialInformation

public void setCommercialInformation(java.lang.String sPrice,
                                     java.lang.String sValidUntil,
                                     java.lang.String sContactUrl,
                                     byte byReceivedAs,
                                     java.lang.String sNameOfSeller,
                                     java.lang.String sDescription,
                                     java.lang.String sPictureMimeType,
                                     byte[] abySellerLogoData)
                              throws ID3Exception
Set commercial information.

Parameters:
sPrice - a price(s) string (a price string consists of a three letter ISO-4217 currency code, followed by an amount, where "." is used as the decimal separator). Multiple prices may be separated by a "/" characters.
sValidUntil - the date the prices offer is valid until, in the format YYYYMMDD
sContactUrl - an URL at which contact can be made with the seller
byReceivedAs - byte specifying how the track will be delivered when purchased
sNameOfSeller - the name of the seller
sDescription - short description of the product
sPictureMimeType - the mime type of the picture (only "image/jpeg" and "image/png" are allowed by the ID3 specification)
abySellerLogoData - the image data containing the seller's logo
Throws:
ID3Exception - if sPrice is null or invalid
ID3Exception - if sValidUntil is null or invalid
ID3Exception - if sContactUrl is null
ID3Exception - if sNameOfSeller is null
ID3Exception - if sDecription is null

getPrice

public java.lang.String getPrice()
Get price.

Returns:
price string

getValidUntilDate

public java.lang.String getValidUntilDate()
Get valid until date.

Returns:
valid until date

getContactUrl

public java.lang.String getContactUrl()
Get contact URL string.

Returns:
the contact URL string

getReceivedAsFormat

public byte getReceivedAsFormat()
Get received as format.

Returns:
the byte specifying the received as format

getNameOfSeller

public java.lang.String getNameOfSeller()
Get name of seller.

Returns:
the name of the seller

getDescription

public java.lang.String getDescription()
Get description of item.

Returns:
the description of the item being sold

getSellerLogoMimeType

public java.lang.String getSellerLogoMimeType()
Get mime type of the seller logo image.

Returns:
mime type of the seller logo image

getSellerLogoData

public byte[] getSellerLogoData()
Get image data for the seller logo.

Returns:
image data for the seller logo

setTextEncoding

public void setTextEncoding(TextEncoding oTextEncoding)
Set the text encoding to be used for the name of seller and description in this frame.

Parameters:
oTextEncoding - the text encoding to be used for this frame

getTextEncoding

public TextEncoding getTextEncoding()
Get the text encoding used for the name of seller and description in this frame.

Returns:
the text encoding to be used for this frame

getFrameId

protected byte[] getFrameId()
Description copied from class: ID3V2Frame
Get the four bytes which uniquely specify of which type this frame is.

Specified by:
getFrameId in class ID3V2Frame

toString

public java.lang.String toString()
Description copied from class: ID3V2Frame
Represent the contents of this frame as a string. For debugging purposes.

Specified by:
toString in class ID3V2Frame
Returns:
a string representing this frame

writeBody

protected void writeBody(ID3DataOutputStream oIDOS)
                  throws java.io.IOException
Description copied from class: ID3V2Frame
Write the body of the frame to an ID3 data output stream.

Specified by:
writeBody in class ID3V2Frame
Parameters:
oIDOS - the output stream to write to
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object oOther)