Modifier and Type | Field and Description |
---|---|
protected BoxParser |
boxParser |
protected DataSource |
dataSource |
Constructor and Description |
---|
BasicContainer() |
Modifier and Type | Method and Description |
---|---|
void |
addBox(Box b)
Add
b 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.
|
ByteBuffer |
getByteBuffer(long start,
long size) |
protected long |
getContainerSize() |
boolean |
hasNext() |
Box |
next() |
void |
parseContainer(DataSource dataSource,
long containerSize,
BoxParser boxParser) |
void |
remove() |
void |
setBoxes(List<Box> boxes)
Sets all boxes and removes all previous child boxes.
|
String |
toString() |
void |
writeContainer(WritableByteChannel bb) |
protected BoxParser boxParser
protected DataSource dataSource
public List<Box> getBoxes()
Container
null
.protected long getContainerSize()
public void setBoxes(List<Box> boxes)
Container
public <T extends Box> List<T> getBoxes(Class<T> clazz)
Container
null
.public <T extends Box> List<T> getBoxes(Class<T> clazz, boolean recursive)
Container
null
.public void addBox(Box b)
b
to the container and sets the parent correctly.b
- will be added to the containerpublic void parseContainer(DataSource dataSource, long containerSize, BoxParser boxParser) throws IOException
IOException
public final void writeContainer(WritableByteChannel bb) throws IOException
writeContainer
in interface Container
IOException
public ByteBuffer getByteBuffer(long start, long size) throws IOException
getByteBuffer
in interface Container
IOException
Copyright © 2014. All rights reserved.