com.coremedia.iso.boxes
Class UserDataBox
java.lang.Object
com.coremedia.iso.boxes.AbstractBox
com.coremedia.iso.boxes.AbstractContainerBox
com.coremedia.iso.boxes.UserDataBox
- All Implemented Interfaces:
- Box, ContainerBox
public class UserDataBox
- extends AbstractContainerBox
This box contains objects that declare user information about the containing box and its data (presentation or
track).
The User Data Box is a container box for informative user-data. This user data is formatted as a set of boxes
with more specific box types, which declare more precisely their content
Field Summary |
static java.lang.String |
TYPE
|
Method Summary |
void |
_parseDetails(java.nio.ByteBuffer content)
Implement the actual parsing of the box's fields here. |
protected void |
getContent(java.nio.ByteBuffer bb)
Writes the box's content into the given ByteBuffer . |
protected long |
getContentSize()
Gets the box's content size. |
void |
parse(java.nio.channels.ReadableByteChannel in,
java.nio.ByteBuffer header,
long contentSize,
BoxParser boxParser)
Pareses the given IsoBufferWrapper and returns the remaining bytes. |
Methods inherited from class com.coremedia.iso.boxes.AbstractBox |
getBox, getDeadBytes, getHeader, getIsoFile, getParent, getSize, getType, getUserType, isParsed, parseDetails, setDeadBytes, setParent, setUserType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
UserDataBox
public UserDataBox()
getContentSize
protected long getContentSize()
- Description copied from class:
AbstractBox
- Gets the box's content size. This excludes all header fields:
- 4 byte size
- 4 byte type
- (large length - 8 bytes)
- (user type - 16 bytes)
Flags and version of a full box need to be taken into account.
- Overrides:
getContentSize
in class AbstractContainerBox
- Returns:
- Gets the box's content size in bytes
parse
public void parse(java.nio.channels.ReadableByteChannel in,
java.nio.ByteBuffer header,
long contentSize,
BoxParser boxParser)
throws java.io.IOException
- Description copied from class:
AbstractBox
- Pareses the given IsoBufferWrapper and returns the remaining bytes.
- Specified by:
parse
in interface Box
- Overrides:
parse
in class AbstractContainerBox
- Parameters:
in
- the (part of the) iso file to parsecontentSize
- expected contentSize of the boxboxParser
- creates inner boxes
- Throws:
java.io.IOException
- in case of an I/O error.
_parseDetails
public void _parseDetails(java.nio.ByteBuffer content)
- Description copied from class:
AbstractBox
- Implement the actual parsing of the box's fields here. External classes will always call
AbstractBox.parseDetails()
which encapsulates the call to this method with some safeguards.
- Overrides:
_parseDetails
in class AbstractContainerBox
getContent
protected void getContent(java.nio.ByteBuffer bb)
throws java.io.IOException
- Description copied from class:
AbstractBox
- Writes the box's content into the given
ByteBuffer
. This must include flags
and version in case of a full box. bb
has been initialized with
getSize()
bytes.
- Overrides:
getContent
in class AbstractContainerBox
- Parameters:
bb
- the box's content-sink.
- Throws:
java.io.IOException
- in case of an exception in the underlying OutputStream
.
Copyright © 2012. All Rights Reserved.