public class BasicContainer extends Object implements Container
| Constructor and Description |
|---|
BasicContainer() |
BasicContainer(List<Box> boxes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBox(Box box)
Add
box to the container and sets the parent correctly. |
List<Box> |
getBoxes()
Gets all child boxes.
|
<T extends Box> |
getBoxes(Class<T> clazz)
Gets all child boxes of the given type.
|
<T extends Box> |
getBoxes(Class<T> clazz,
boolean recursive)
Gets all child boxes of the given type.
|
protected long |
getContainerSize() |
void |
initContainer(ReadableByteChannel readableByteChannel,
long containerSize,
BoxParser boxParser) |
void |
setBoxes(List<? extends Box> boxes)
Sets all boxes and removes all previous child boxes.
|
String |
toString() |
void |
writeContainer(WritableByteChannel bb) |
public List<Box> getBoxes()
Containernull.public void setBoxes(List<? extends Box> boxes)
Containerprotected long getContainerSize()
public <T extends Box> List<T> getBoxes(Class<T> clazz)
Containernull.public <T extends Box> List<T> getBoxes(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(ReadableByteChannel readableByteChannel, long containerSize, BoxParser boxParser) throws IOException
IOExceptionpublic final void writeContainer(WritableByteChannel bb) throws IOException
writeContainer in interface ContainerIOExceptionCopyright © 2015. All rights reserved.