public class Mp4TagBinaryField extends Mp4TagField
Subclassed by cover art field, TODO unaware of any other binary fields at the moment
Modifier and Type | Field and Description |
---|---|
protected byte[] |
dataBytes |
protected int |
dataSize |
protected boolean |
isBinary |
id, logger, parentHeader
Constructor and Description |
---|
Mp4TagBinaryField(String id)
Construct an empty Binary Field
|
Mp4TagBinaryField(String id,
byte[] data)
Construct new binary field with binarydata provided
|
Mp4TagBinaryField(String id,
ByteBuffer raw)
Construct binary field from rawdata of audio file
|
Modifier and Type | Method and Description |
---|---|
protected void |
build(ByteBuffer raw)
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.
|
void |
copyContent(TagField field)
This method copies the data of the given field to the current data.
|
byte[] |
getData() |
protected byte[] |
getDataBytes()
Used when creating raw content
|
int |
getDataSize() |
Mp4FieldType |
getFieldType() |
boolean |
isBinary()
Determines whether the represented field contains (is made up of) binary
data, instead of text data.
Software can identify fields to be displayed because they are human readable if this method returns false . |
boolean |
isEmpty()
Determines whether the content of the field is empty.
|
void |
setData(byte[] d) |
getId, getIdBytes, getRawContent, getRawContentDataOnly, isBinary, isCommon
protected int dataSize
protected byte[] dataBytes
protected boolean isBinary
public Mp4TagBinaryField(String id)
id
- public Mp4TagBinaryField(String id, byte[] data)
id
- data
- UnsupportedEncodingException
public Mp4TagBinaryField(String id, ByteBuffer raw) throws UnsupportedEncodingException
id
- raw
- UnsupportedEncodingException
public Mp4FieldType getFieldType()
getFieldType
in class Mp4TagField
protected byte[] getDataBytes() throws UnsupportedEncodingException
getDataBytes
in class Mp4TagField
UnsupportedEncodingException
protected void build(ByteBuffer raw)
Mp4TagField
build
in class Mp4TagField
public boolean isBinary()
TagField
false
.true
if field represents binary data (not human
readable).public boolean isEmpty()
TagField
true
if no data is stored (or empty String).public int getDataSize()
public byte[] getData()
public void setData(byte[] d)
Copyright © 2005–2020 jthink.net. All rights reserved.