|
||||||||||
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.AbstractContainerBox
public abstract class AbstractContainerBox
Abstract base class suitable for most boxes acting purely as container for other boxes.
Field Summary | |
---|---|
protected List<Box> |
boxes
|
Fields inherited from class com.coremedia.iso.boxes.AbstractBox |
---|
offset, parsed |
Constructor Summary | |
---|---|
AbstractContainerBox(byte[] type)
|
Method Summary | ||
---|---|---|
void |
addBox(Box b)
|
|
List<Box> |
getBoxes()
Gets all child boxes. |
|
|
getBoxes(Class<T> clazz)
Gets all child boxes of the given type. |
|
|
getBoxes(Class<T> clazz,
boolean recursive)
Gets all child boxes of the given type. |
|
protected void |
getContent(IsoOutputStream os)
Writes the box's content into the given IsoOutputStream . |
|
protected long |
getContentSize()
Gets the box's content size without header size. |
|
long |
getNumOfBytesToFirstChild()
Returns the number of bytes from the start of the box to start of the first child. |
|
void |
parse(IsoBufferWrapper in,
long size,
BoxParser boxParser,
Box lastMovieFragmentBox)
Pareses the given IsoBufferWrapper and returns the remaining bytes. |
|
void |
removeBox(Box b)
|
|
void |
setBoxes(List<Box> boxes)
Sets all boxes and removes all previous child boxes. |
|
String |
toString()
|
Methods inherited from class com.coremedia.iso.boxes.AbstractBox |
---|
addWriteListener, calculateOffset, getBox, getDeadBytes, getDisplayName, getHeader, getHeaderSize, getIsoFile, getOffset, getParent, getSize, getType, getUserType, isParsed, setDeadBytes, setParent, setParsed, setUserType, utf8StringLengthInBytes |
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 |
---|
calculateOffset, getBox, getOffset, getSize, getType, getUserType, isParsed |
Field Detail |
---|
protected List<Box> boxes
Constructor Detail |
---|
public AbstractContainerBox(byte[] type)
Method Detail |
---|
protected long getContentSize()
AbstractBox
getContentSize
in class AbstractBox
public List<Box> getBoxes()
ContainerBox
null
.
getBoxes
in interface ContainerBox
public void setBoxes(List<Box> boxes)
ContainerBox
setBoxes
in interface ContainerBox
boxes
- the new list of childrenpublic <T extends Box> List<T> getBoxes(Class<T> clazz)
ContainerBox
null
.
getBoxes
in interface ContainerBox
clazz
- child box's type
public <T extends Box> List<T> getBoxes(Class<T> clazz, boolean recursive)
ContainerBox
null
.
getBoxes
in interface ContainerBox
clazz
- child box's typerecursive
- step down the tree
public void addBox(Box b)
public void removeBox(Box b)
public void parse(IsoBufferWrapper in, long size, BoxParser boxParser, Box lastMovieFragmentBox) throws IOException
AbstractBox
parse
in class AbstractBox
in
- the (part of the) iso file to parsesize
- expected size of the boxboxParser
- creates inner boxeslastMovieFragmentBox
- latest of previously found moof boxes
IOException
- in case of an I/O error.protected void getContent(IsoOutputStream os) throws IOException
AbstractBox
IsoOutputStream
. This MUST NOT include
any header bytes.
getContent
in class AbstractBox
os
- the box's content-sink.
IOException
- in case of an exception in the underlying OutputStream
.public String toString()
toString
in class Object
public long getNumOfBytesToFirstChild()
ContainerBox
getNumOfBytesToFirstChild
in interface ContainerBox
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |