FrameBodyPCNTpublic class FrameBodyPCNT extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBodyPlay counter frame.
This is simply a counter of the number of times a file has been
played. The value is increased by one every time the file begins to
play. There may only be one "PCNT" frame in each tag. When the
counter reaches all one's, one byte is inserted in front of the
counter thus making the counter eight bits bigger. The counter must
be at least 32-bits long to begin with.
<Header for 'Play counter', ID: "PCNT"> |
Counter | $xx xx xx xx (xx ...) |
For more details, please refer to the ID3 specifications:
|
Fields Summary |
---|
private static final int | COUNTER_MINIMUM_FIELD_SIZE |
Constructors Summary |
---|
public FrameBodyPCNT()Creates a new FrameBodyPCNT datatype.
this.setObjectValue(DataTypes.OBJ_NUMBER, 0L);
| public FrameBodyPCNT(FrameBodyPCNT body)
super(body);
| public FrameBodyPCNT(long counter)Creates a new FrameBodyPCNT datatype.
this.setObjectValue(DataTypes.OBJ_NUMBER, counter);
| public FrameBodyPCNT(ByteBuffer byteBuffer, int frameSize)Creates a new FrameBodyPCNT datatype.
super(byteBuffer, frameSize);
|
Methods Summary |
---|
public long | getCounter()
return ((Number) getObjectValue(DataTypes.OBJ_NUMBER)).longValue();
| public java.lang.String | getIdentifier()The ID3v2 frame identifier
return ID3v24Frames.FRAME_ID_PLAY_COUNTER;
| public void | setCounter(long counter)Set the play counter of this file
setObjectValue(DataTypes.OBJ_NUMBER, counter);
| protected void | setupObjectList()
objectList.add(new NumberVariableLength(DataTypes.OBJ_NUMBER, this, COUNTER_MINIMUM_FIELD_SIZE));
|
|