| 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 box)
Add
box to the container and sets the parent correctly. |
void |
close() |
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 rangeStart,
long size) |
protected long |
getContainerSize() |
boolean |
hasNext() |
void |
initContainer(DataSource dataSource,
long containerSize,
BoxParser boxParser) |
Box |
next() |
void |
remove() |
void |
setBoxes(List<Box> boxes)
Sets all boxes and removes all previous child boxes.
|
String |
toString() |
void |
writeContainer(WritableByteChannel bb) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingprotected BoxParser boxParser
protected DataSource dataSource
public List<Box> getBoxes()
Containernull.public void setBoxes(List<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(DataSource dataSource, long containerSize, BoxParser boxParser) throws IOException
IOExceptionpublic final void writeContainer(WritableByteChannel bb) throws IOException
writeContainer in interface ContainerIOExceptionpublic ByteBuffer getByteBuffer(long rangeStart, long size) throws IOException
getByteBuffer in interface ContainerIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017. All rights reserved.