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