public class Mp4TagRawBinaryField extends Mp4TagField
We use this when we find an atom under the ilst atom that we do not recognise , that does not follow standard conventions in order to save the data without modification so it can be safetly written back to file
Modifier and Type | Field and Description |
---|---|
protected byte[] |
dataBytes |
protected int |
dataSize |
id, logger, parentHeader
Constructor and Description |
---|
Mp4TagRawBinaryField(Mp4BoxHeader header,
ByteBuffer raw)
Construct binary field from rawdata of audio file
|
Modifier and Type | Method and Description |
---|---|
protected void |
build(ByteBuffer raw)
Build from data
|
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() |
byte[] |
getRawContent()
Convert back to raw content, includes parent and data atom as views as one thing externally
|
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, getRawContentDataOnly, isBinary, isCommon
public Mp4TagRawBinaryField(Mp4BoxHeader header, ByteBuffer raw) throws UnsupportedEncodingException
header
- raw
- UnsupportedEncodingException
public Mp4FieldType getFieldType()
getFieldType
in class Mp4TagField
protected byte[] getDataBytes() throws UnsupportedEncodingException
getDataBytes
in class Mp4TagField
UnsupportedEncodingException
protected void build(ByteBuffer raw)
After returning buffers position will be after the end of this atom
build
in class Mp4TagField
raw
- 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)
public void copyContent(TagField field)
TagField
field
- The field containing the data to be taken.public byte[] getRawContent() throws UnsupportedEncodingException
Mp4TagField
getRawContent
in interface TagField
getRawContent
in class Mp4TagField
UnsupportedEncodingException
- Most tag data represents text. In some cases the underlying
implementation will need to convert the text data in java to
a specific charset encoding. In these cases an
UnsupportedEncodingException
may occur.Copyright © 2005–2020 jthink.net. All rights reserved.