public class BasicContainer extends java.lang.Object implements Container
| Constructor and Description |
|---|
BasicContainer() |
BasicContainer(java.util.List<Box> boxes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBox(Box box)
Add
box to the container and sets the parent correctly. |
java.util.List<Box> |
getBoxes()
Gets all child boxes.
|
<T extends Box> |
getBoxes(java.lang.Class<T> clazz)
Gets all child boxes of the given type.
|
<T extends Box> |
getBoxes(java.lang.Class<T> clazz,
boolean recursive)
Gets all child boxes of the given type.
|
protected long |
getContainerSize() |
void |
initContainer(java.nio.channels.ReadableByteChannel readableByteChannel,
long containerSize,
BoxParser boxParser) |
void |
setBoxes(java.util.List<? extends Box> boxes)
Sets all boxes and removes all previous child boxes.
|
java.lang.String |
toString() |
void |
writeContainer(java.nio.channels.WritableByteChannel bb) |
public BasicContainer()
public BasicContainer(java.util.List<Box> boxes)
public java.util.List<Box> getBoxes()
Containernull.public void setBoxes(java.util.List<? extends Box> boxes)
Containerprotected long getContainerSize()
public <T extends Box> java.util.List<T> getBoxes(java.lang.Class<T> clazz)
Containernull.public <T extends Box> java.util.List<T> getBoxes(java.lang.Class<T> clazz, boolean recursive)
Containernull.public void addBox(Box box)
box to the container and sets the parent correctly. If box is null
nochange will be performed and no error thrown.box - will be added to the containerpublic void initContainer(java.nio.channels.ReadableByteChannel readableByteChannel,
long containerSize,
BoxParser boxParser)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic final void writeContainer(java.nio.channels.WritableByteChannel bb)
throws java.io.IOException
writeContainer in interface Containerjava.io.IOExceptionCopyright © 2020. All rights reserved.