public class XtraBox extends AbstractBox
| Modifier and Type | Field and Description |
|---|---|
static int |
MP4_XTRA_BT_FILETIME |
static int |
MP4_XTRA_BT_GUID |
static int |
MP4_XTRA_BT_INT64 |
static int |
MP4_XTRA_BT_UNICODE |
static java.lang.String |
TYPE |
content, type| Constructor and Description |
|---|
XtraBox() |
XtraBox(java.lang.String type) |
| Modifier and Type | Method and Description |
|---|---|
void |
_parseDetails(java.nio.ByteBuffer content)
Parse the box's fields and child boxes if any.
|
java.lang.String[] |
getAllTagNames()
Returns a list of the tag names present in this Xtra Box
|
protected void |
getContent(java.nio.ByteBuffer byteBuffer)
Write the box's content into the given
ByteBuffer. |
protected long |
getContentSize()
Get the box's content size without its header.
|
java.util.Date |
getFirstDateValue(java.lang.String name)
Returns the first Date value found for this tag
|
java.lang.Long |
getFirstLongValue(java.lang.String name)
Returns the first Long value found for this tag
|
java.lang.String |
getFirstStringValue(java.lang.String name)
Returns the first String value found for this tag
|
java.lang.Object[] |
getValues(java.lang.String name)
Returns an array of values for this tag.
|
void |
removeTag(java.lang.String name)
Removes specified tag (all values for that tag will be removed)
|
void |
setTagValue(java.lang.String name,
java.util.Date date)
Removes and recreates tag using specified Date value
|
void |
setTagValue(java.lang.String name,
long value)
Removes and recreates tag using specified Long value
|
void |
setTagValue(java.lang.String name,
java.lang.String value)
Removes and recreates tag using specified String value
|
void |
setTagValues(java.lang.String name,
java.lang.String[] values)
Removes and recreates tag using specified String values
|
java.lang.String |
toString() |
getBox, getSize, getType, getUserType, isParsed, parse, parseDetailspublic static final java.lang.String TYPE
public static final int MP4_XTRA_BT_UNICODE
public static final int MP4_XTRA_BT_INT64
public static final int MP4_XTRA_BT_FILETIME
public static final int MP4_XTRA_BT_GUID
protected long getContentSize()
AbstractBoxgetContent(ByteBuffer) writes.getContentSize in class AbstractBoxAbstractBox.getContent(java.nio.ByteBuffer)public java.lang.String toString()
toString in class java.lang.Objectpublic void _parseDetails(java.nio.ByteBuffer content)
AbstractBox_parseDetails in class AbstractBoxcontent - the box's raw content beginning after the 4-cc field.protected void getContent(java.nio.ByteBuffer byteBuffer)
AbstractBoxByteBuffer. This must include flags
and version in case of a full box. byteBuffer has been initialized with
getSize() bytes.getContent in class AbstractBoxbyteBuffer - the sink for the box's contentpublic java.lang.String[] getAllTagNames()
public java.lang.String getFirstStringValue(java.lang.String name)
name - Tag namepublic java.util.Date getFirstDateValue(java.lang.String name)
name - Tag namepublic java.lang.Long getFirstLongValue(java.lang.String name)
name - Tag namepublic java.lang.Object[] getValues(java.lang.String name)
name - Tag name to retrievepublic void removeTag(java.lang.String name)
name - Tag to removepublic void setTagValues(java.lang.String name,
java.lang.String[] values)
name - Tag name to replacevalues - New String valuespublic void setTagValue(java.lang.String name,
java.lang.String value)
name - Tag name to replacevalue - New String valuepublic void setTagValue(java.lang.String name,
java.util.Date date)
name - Tag name to replacedate - New Date valuepublic void setTagValue(java.lang.String name,
long value)
name - Tag name to replacevalue - New Long valueCopyright © 2020. All rights reserved.