|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.coremedia.iso.boxes.AbstractBox
com.coremedia.iso.boxes.AbstractFullBox
com.coremedia.iso.boxes.FullContainerBox
public abstract class FullContainerBox
Abstract base class for a full iso box only containing ither boxes.
Field Summary | |
---|---|
protected java.util.List<Box> |
boxes
|
Fields inherited from class com.coremedia.iso.boxes.AbstractBox |
---|
deadBytes, type |
Constructor Summary | |
---|---|
FullContainerBox(java.lang.String type)
|
Method Summary | ||
---|---|---|
void |
_parseDetails(java.nio.ByteBuffer content)
Implement the actual parsing of the box's fields here. |
|
void |
addBox(Box b)
|
|
java.util.List<Box> |
getBoxes()
Gets all child boxes. |
|
|
getBoxes(java.lang.Class<T> clazz)
Gets all child boxes of the given type. |
|
|
getBoxes(java.lang.Class<T> clazz,
boolean recursive)
Gets all child boxes of the given type. |
|
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. |
|
long |
getNumOfBytesToFirstChild()
Returns the number of bytes from the start of the box to start of the first child. |
|
void |
parse(java.nio.channels.ReadableByteChannel in,
java.nio.ByteBuffer header,
long contentSize,
BoxParser boxParser)
Pareses the given IsoBufferWrapper and returns the remaining bytes. |
|
protected void |
parseChildBoxes(java.nio.ByteBuffer content)
|
|
void |
removeBox(Box b)
|
|
void |
setBoxes(java.util.List<Box> boxes)
Sets all boxes and removes all previous child boxes. |
|
java.lang.String |
toString()
|
|
protected void |
writeChildBoxes(java.nio.ByteBuffer bb)
|
Methods inherited from class com.coremedia.iso.boxes.AbstractFullBox |
---|
getFlags, getVersion, parseVersionAndFlags, setFlags, setVersion, writeVersionAndFlags |
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 |
Methods inherited from interface com.coremedia.iso.boxes.ContainerBox |
---|
getIsoFile, getParent |
Methods inherited from interface com.coremedia.iso.boxes.Box |
---|
getBox, getSize, getType, setParent |
Field Detail |
---|
protected java.util.List<Box> boxes
Constructor Detail |
---|
public FullContainerBox(java.lang.String type)
Method Detail |
---|
public void setBoxes(java.util.List<Box> boxes)
ContainerBox
setBoxes
in interface ContainerBox
boxes
- the new list of childrenpublic <T extends Box> java.util.List<T> getBoxes(java.lang.Class<T> clazz)
ContainerBox
null
.
getBoxes
in interface ContainerBox
clazz
- child box's type
public <T extends Box> java.util.List<T> getBoxes(java.lang.Class<T> clazz, boolean recursive)
ContainerBox
null
.
getBoxes
in interface ContainerBox
clazz
- child box's typerecursive
- step down the tree
protected long getContentSize()
AbstractBox
getContentSize
in class AbstractBox
public void addBox(Box b)
public void removeBox(Box b)
public java.util.List<Box> getBoxes()
ContainerBox
null
.
getBoxes
in interface ContainerBox
public void parse(java.nio.channels.ReadableByteChannel in, java.nio.ByteBuffer header, long contentSize, BoxParser boxParser) throws java.io.IOException
AbstractBox
parse
in interface Box
parse
in class AbstractBox
in
- the (part of the) iso file to parsecontentSize
- expected contentSize of the boxboxParser
- creates inner boxes
java.io.IOException
- in case of an I/O error.public void _parseDetails(java.nio.ByteBuffer content)
AbstractBox
AbstractBox.parseDetails()
which encapsulates the call to this method with some safeguards.
_parseDetails
in class AbstractBox
protected final void parseChildBoxes(java.nio.ByteBuffer content)
public java.lang.String toString()
toString
in class java.lang.Object
protected void getContent(java.nio.ByteBuffer bb) throws java.io.IOException
AbstractBox
ByteBuffer
. This must include flags
and version in case of a full box. bb
has been initialized with
getSize()
bytes.
getContent
in class AbstractBox
bb
- the box's content-sink.
java.io.IOException
- in case of an exception in the underlying OutputStream
.protected final void writeChildBoxes(java.nio.ByteBuffer bb) throws java.io.IOException
java.io.IOException
public long getNumOfBytesToFirstChild()
ContainerBox
getNumOfBytesToFirstChild
in interface ContainerBox
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |