org.farng.mp3.id3
Class FrameBodyPOPM

java.lang.Object
  extended byorg.farng.mp3.AbstractMP3FileItem
      extended byorg.farng.mp3.AbstractMP3FragmentBody
          extended byorg.farng.mp3.id3.AbstractID3v2FrameBody
              extended byorg.farng.mp3.id3.FrameBodyPOPM

public class FrameBodyPOPM
extends AbstractID3v2FrameBody

4.17.   Popularimeter

   The purpose of this frame is to specify how good an audio file is.
   Many interesting applications could be found to this frame such as a
   playlist that features better audio files more often than others or

   it could be used to profile a person's taste and find other 'good'
   files by comparing people's profiles. The frame contains the email
   address to the user, one rating byte and a four byte play counter,
   intended to be increased with one for every time the file is played.
   The email is a terminated string. The rating is 1-255 where 1 is

   worst and 255 is best. 0 is unknown. If no personal counter is wanted
   it may be omitted. When the counter reaches all one's, one byte is
   inserted in front of the counter thus making the counter eight bits
   bigger in the same away as the play counter ("PCNT"). There may be

   more than one "POPM" frame in each tag, but only one with the same
   email address.

     <Header for 'Popularimeter', ID: "POPM">
     Email to user   <text string> $00

     Rating          $xx
     Counter         $xx xx xx xx (xx ...)

Version:
$Revision: 1.4 $
Author:
Eric Farng

Constructor Summary
FrameBodyPOPM()
          Creates a new FrameBodyPOPM object.
FrameBodyPOPM(FrameBodyPOPM body)
          Creates a new FrameBodyPOPM object.
FrameBodyPOPM(java.io.RandomAccessFile file)
          Creates a new FrameBodyPOPM object.
FrameBodyPOPM(java.lang.String emailToUser, byte rating, long counter)
          Creates a new FrameBodyPOPM object.
 
Method Summary
 java.lang.String getEmailToUser()
           
 java.lang.String getIdentifier()
          ID string that usually corresponds to the class name, but can be displayed to the user.
 void setEmailToUser(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

FrameBodyPOPM

public FrameBodyPOPM()
Creates a new FrameBodyPOPM object.


FrameBodyPOPM

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


FrameBodyPOPM

public FrameBodyPOPM(java.lang.String emailToUser,
                     byte rating,
                     long counter)
Creates a new FrameBodyPOPM object.


FrameBodyPOPM

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

Method Detail

setEmailToUser

public void setEmailToUser(java.lang.String description)

getEmailToUser

public java.lang.String getEmailToUser()

getIdentifier

public java.lang.String getIdentifier()
Description copied from class: AbstractMP3FileItem
ID string that usually corresponds to the class name, but can be displayed to the user. It is not indended to identify each individual instance.

Specified by:
getIdentifier in class AbstractMP3FileItem
Returns:
ID string

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


Copyright (c) 2004 Eric Farng