FrameBodyTRCKpublic class FrameBodyTRCK extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBodyTrack number/position in set Text Information frame.
The 'Track number/Position in set' frame is a numeric string containing the order number of the audio-file on its original recording.
This may be extended with a "/" character and a numeric string containing the total number of tracks/elements on the original recording.
e.g. "4/9".
Some applications like to prepend the track number with a zero to aid sorting, (i.e 02 comes before 10)
For more details, please refer to the ID3 specifications:
|
Constructors Summary |
---|
public FrameBodyTRCK()Creates a new FrameBodyTRCK datatype.
setObjectValue(DataTypes.OBJ_TEXT_ENCODING, TextEncoding.ISO_8859_1);
setObjectValue(DataTypes.OBJ_TEXT, new PartOfSet.PartOfSetValue());
| public FrameBodyTRCK(FrameBodyTRCK body)
super(body);
| public FrameBodyTRCK(byte textEncoding, String text)Creates a new FrameBodyTRCK datatype, the value is parsed literally
setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
setObjectValue(DataTypes.OBJ_TEXT, new PartOfSet.PartOfSetValue(text));
| public FrameBodyTRCK(byte textEncoding, Integer trackNo, Integer trackTotal)
super();
setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
setObjectValue(DataTypes.OBJ_TEXT, new PartOfSet.PartOfSetValue(trackNo,trackTotal));
| public FrameBodyTRCK(ByteBuffer byteBuffer, int frameSize)Creates a new FrameBodyTRCK datatype.
super(byteBuffer, frameSize);
|
Methods Summary |
---|
public java.lang.String | getIdentifier()The ID3v2 frame identifier
return ID3v24Frames.FRAME_ID_TRACK;
| public java.lang.String | getText()
return getObjectValue(DataTypes.OBJ_TEXT).toString();
| public java.lang.Integer | getTrackNo()
PartOfSet.PartOfSetValue value = (PartOfSet.PartOfSetValue)getObjectValue(DataTypes.OBJ_TEXT);
return value.getCount();
| public java.lang.Integer | getTrackTotal()
return ((PartOfSet.PartOfSetValue)getObjectValue(DataTypes.OBJ_TEXT)).getTotal();
| public java.lang.String | getUserFriendlyValue()
return String.valueOf(getTrackNo());
| public void | setText(java.lang.String text)
setObjectValue(DataTypes.OBJ_TEXT, new PartOfSet.PartOfSetValue(text));
| public void | setTrackNo(java.lang.Integer trackNo)
((PartOfSet.PartOfSetValue)getObjectValue(DataTypes.OBJ_TEXT)).setCount(trackNo);
| public void | setTrackNo(java.lang.String trackNo)
((PartOfSet.PartOfSetValue)getObjectValue(DataTypes.OBJ_TEXT)).setCount(trackNo);
| public void | setTrackTotal(java.lang.Integer trackTotal)
((PartOfSet.PartOfSetValue)getObjectValue(DataTypes.OBJ_TEXT)).setTotal(trackTotal);
| protected void | setupObjectList()
objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE));
objectList.add(new PartOfSet(DataTypes.OBJ_TEXT, this));
|
|