public class Mp4TrackField extends Mp4TagTextNumberField
There are a number of reserved fields making matters more complicated Reserved:2 bytes Track Number:2 bytes No of Tracks:2 bytes (or zero if not known) PlayListTitleReserved: 1 byte playtitlenameReserved:0 bytes
Modifier and Type | Field and Description |
---|---|
private static int |
NONE_END_VALUE_INDEX |
private static int |
NONE_VALUE_INDEX |
private static int |
TRACK_NO_INDEX |
private static int |
TRACK_TOTAL_INDEX |
NUMBER_LENGTH, numbers
content, dataSize
id, logger, parentHeader
Constructor and Description |
---|
Mp4TrackField(int trackNo)
Create new Track Field with only track No
|
Mp4TrackField(int trackNo,
int total)
Create new Track Field with track No and total tracks
|
Mp4TrackField(java.lang.String trackValue)
Create new Track Field parsing the String for the trackno/total
|
Mp4TrackField(java.lang.String id,
java.nio.ByteBuffer data)
Construct from filedata
|
Modifier and Type | Method and Description |
---|---|
protected void |
build(java.nio.ByteBuffer data)
Processes the data and sets the position of the data buffer to just after the end of this fields data
ready for processing next field.
|
java.lang.Short |
getTrackNo() |
java.lang.Short |
getTrackTotal() |
void |
setTrackNo(int trackNo)
Set Track No
|
void |
setTrackTotal(int trackTotal)
Set total number of tracks
|
copyContent, getDataBytes, getFieldType, getNumbers
getContent, getEncoding, isBinary, isEmpty, setContent, setEncoding, toString
getId, getIdBytes, getRawContent, getRawContentDataOnly, isBinary, isCommon
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, getRawContent, isBinary, isCommon
private static final int NONE_VALUE_INDEX
private static final int TRACK_NO_INDEX
private static final int TRACK_TOTAL_INDEX
private static final int NONE_END_VALUE_INDEX
public Mp4TrackField(java.lang.String trackValue) throws FieldDataInvalidException
trackValue
- FieldDataInvalidException
public Mp4TrackField(int trackNo)
trackNo
- public Mp4TrackField(int trackNo, int total)
trackNo
- total
- public Mp4TrackField(java.lang.String id, java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
id
- data
- java.io.UnsupportedEncodingException
protected void build(java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
Mp4TagField
build
in class Mp4TagTextNumberField
java.io.UnsupportedEncodingException
public java.lang.Short getTrackNo()
public java.lang.Short getTrackTotal()
public void setTrackNo(int trackNo)
trackNo
- public void setTrackTotal(int trackTotal)
trackTotal
- Copyright © 2005-2013 java.net. All Rights Reserved.