public class Mp4TagByteField extends Mp4TagTextField
Usually single byte fields are used as a boolean field, but not always so we dont do this conversion
Modifier and Type | Field and Description |
---|---|
static String |
FALSE_VALUE |
static String |
TRUE_VALUE |
content, dataSize
id, logger, parentHeader
Constructor and Description |
---|
Mp4TagByteField(Mp4FieldKey id,
String value)
Create new field
Assume length of 1 which is correct for most but not all byte fields
|
Mp4TagByteField(Mp4FieldKey id,
String value,
int realDataLength)
Create new field with known length
|
Mp4TagByteField(String id,
ByteBuffer raw)
Construct from rawdata from audio file
|
Modifier and Type | Method and Description |
---|---|
protected void |
build(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.
|
protected byte[] |
getDataBytes()
Return raw data bytes
TODO this code should be done better so generalised to any length
|
Mp4FieldType |
getFieldType() |
copyContent, 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
public static String TRUE_VALUE
public static String FALSE_VALUE
public Mp4TagByteField(Mp4FieldKey id, String value) throws FieldDataInvalidException
id
- value
- is a String representation of a numberFieldDataInvalidException
public Mp4TagByteField(Mp4FieldKey id, String value, int realDataLength) throws FieldDataInvalidException
id
- value
- is a String representation of a numberrealDataLength
- FieldDataInvalidException
public Mp4TagByteField(String id, ByteBuffer raw) throws UnsupportedEncodingException
id
- raw
- UnsupportedEncodingException
public Mp4FieldType getFieldType()
getFieldType
in class Mp4TagTextField
protected byte[] getDataBytes() throws UnsupportedEncodingException
getDataBytes
in class Mp4TagTextField
UnsupportedEncodingException
protected void build(ByteBuffer data) throws UnsupportedEncodingException
Mp4TagField
build
in class Mp4TagTextField
UnsupportedEncodingException
Copyright © 2005–2020 jthink.net. All rights reserved.