|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.tag.id3.AbstractTagItem org.jaudiotagger.tag.id3.AbstractTagFrameBody org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody org.jaudiotagger.tag.id3.framebody.FrameBodyPOPM
public class FrameBodyPOPM
Popularimeter frame.
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 audiofiles 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 is very simple. It 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 ...) |
For more details, please refer to the ID3 specifications:
Field Summary | |
---|---|
private static int |
COUNTER_MINIMUM_FIELD_SIZE
|
private static int |
RATING_FIELD_SIZE
|
Fields inherited from class org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody |
---|
TYPE_BODY |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagFrameBody |
---|
objectList |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagItem |
---|
logger |
Constructor Summary | |
---|---|
FrameBodyPOPM()
Creates a new FrameBodyPOPM datatype. |
|
FrameBodyPOPM(java.nio.ByteBuffer byteBuffer,
int frameSize)
Creates a new FrameBodyPOPM datatype. |
|
FrameBodyPOPM(FrameBodyPOPM body)
|
|
FrameBodyPOPM(java.lang.String emailToUser,
long rating,
long counter)
Creates a new FrameBodyPOPM datatype. |
Method Summary | |
---|---|
long |
getCounter()
|
java.lang.String |
getEmailToUser()
|
java.lang.String |
getIdentifier()
The ID3v2 frame identifier |
long |
getRating()
|
void |
setCounter(long counter)
Set the play counter of this file |
void |
setEmailToUser(java.lang.String description)
|
void |
setRating(long rating)
Set the rating given to this file |
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 |
Methods inherited from class org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody |
---|
createStructure, equals, getSize, read, setSize, setSize, write |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagFrameBody |
---|
getBriefDescription, getHeader, getLongDescription, getObject, getObjectValue, getTextEncoding, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final int RATING_FIELD_SIZE
private static final int COUNTER_MINIMUM_FIELD_SIZE
Constructor Detail |
---|
public FrameBodyPOPM()
public FrameBodyPOPM(FrameBodyPOPM body)
public FrameBodyPOPM(java.lang.String emailToUser, long rating, long counter)
emailToUser
- rating
- counter
- public FrameBodyPOPM(java.nio.ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
-
InvalidTagException
- if unable to create framebody from bufferMethod Detail |
---|
public void setEmailToUser(java.lang.String description)
description
- public java.lang.String getEmailToUser()
public long getRating()
public void setRating(long rating)
rating
- public long getCounter()
public void setCounter(long counter)
counter
- public java.lang.String getIdentifier()
getIdentifier
in class AbstractID3v2FrameBody
protected void setupObjectList()
AbstractTagFrameBody
setupObjectList
in class AbstractTagFrameBody
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |