public abstract class Mp4TagField extends Object implements TagField
Modifier and Type | Field and Description |
---|---|
protected String |
id |
static Logger |
logger |
protected Mp4BoxHeader |
parentHeader |
Modifier | Constructor and Description |
---|---|
protected |
Mp4TagField(ByteBuffer data)
Used by subclasses that canot identify their id until after they have been built such as ReverseDnsField
|
protected |
Mp4TagField(Mp4BoxHeader parentHeader,
ByteBuffer data)
Used by reverese dns when reading from file, so can identify when there is a data atom
|
protected |
Mp4TagField(String id) |
protected |
Mp4TagField(String id,
ByteBuffer data) |
Modifier and Type | Method and Description |
---|---|
protected abstract 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 abstract byte[] |
getDataBytes() |
abstract Mp4FieldType |
getFieldType() |
String |
getId()
Returns the Id of the represented tag field.
This value should uniquely identify a kind of tag data, like title. |
protected byte[] |
getIdBytes() |
byte[] |
getRawContent()
Convert back to raw content, includes parent and data atom as views as one thing externally
|
byte[] |
getRawContentDataOnly()
Get raw content for the data component only
|
void |
isBinary(boolean b)
This method will set the field to represent binary data.
Some implementations may support conversions. As of now (Octobre 2005) there is no implementation really using this method to perform useful operations. |
boolean |
isCommon()
Identifies a field to be of common use.
Some software may differ between common and not common fields. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyContent, isBinary, isEmpty, toString
public static Logger logger
protected String id
protected Mp4BoxHeader parentHeader
protected Mp4TagField(String id)
protected Mp4TagField(ByteBuffer data) throws UnsupportedEncodingException
data
- UnsupportedEncodingException
protected Mp4TagField(Mp4BoxHeader parentHeader, ByteBuffer data) throws UnsupportedEncodingException
parentHeader
- data
- UnsupportedEncodingException
protected Mp4TagField(String id, ByteBuffer data) throws UnsupportedEncodingException
UnsupportedEncodingException
public String getId()
TagField
AbstractTag
will use the "id" to summarize multiple
fields.public void isBinary(boolean b)
TagField
public boolean isCommon()
TagField
protected byte[] getIdBytes()
protected abstract byte[] getDataBytes() throws UnsupportedEncodingException
UnsupportedEncodingException
public abstract Mp4FieldType getFieldType()
protected abstract void build(ByteBuffer data) throws UnsupportedEncodingException
data
- UnsupportedEncodingException
public byte[] getRawContent() throws UnsupportedEncodingException
getRawContent
in interface TagField
UnsupportedEncodingException
public byte[] getRawContentDataOnly() throws UnsupportedEncodingException
UnsupportedEncodingException
Copyright © 2005–2020 jthink.net. All rights reserved.