public abstract class FullContainerBox extends AbstractContainerBox implements FullBox
largeBox, type| Constructor and Description |
|---|
FullContainerBox(java.lang.String type) |
| Modifier and Type | Method and Description |
|---|---|
void |
getBox(java.nio.channels.WritableByteChannel writableByteChannel)
Writes the complete box - size | 4-cc | content - to the given
writableByteChannel. |
<T extends Box> |
getBoxes(java.lang.Class<T> clazz)
Gets all child boxes of the given type.
|
int |
getFlags() |
protected java.nio.ByteBuffer |
getHeader() |
int |
getVersion() |
void |
parse(java.nio.channels.ReadableByteChannel dataSource,
java.nio.ByteBuffer header,
long contentSize,
BoxParser boxParser)
Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).
|
protected long |
parseVersionAndFlags(java.nio.ByteBuffer content)
Parses the version/flags header and returns the remaining box size.
|
void |
setFlags(int flags) |
void |
setVersion(int version) |
java.lang.String |
toString() |
protected void |
writeVersionAndFlags(java.nio.ByteBuffer bb) |
getSize, getType, setParentaddBox, getBoxes, getBoxes, getContainerSize, initContainer, setBoxes, writeContainerpublic int getVersion()
getVersion in interface FullBoxpublic void setVersion(int version)
setVersion in interface FullBoxpublic <T extends Box> java.util.List<T> getBoxes(java.lang.Class<T> clazz)
Containernull.getBoxes in interface ContainergetBoxes in class BasicContainerT - type of boxes to getclazz - child box's typepublic void parse(java.nio.channels.ReadableByteChannel dataSource,
java.nio.ByteBuffer header,
long contentSize,
BoxParser boxParser)
throws java.io.IOException
ParsableBoxcontentSize, contentSize
number of bytes should be read from the box source (readableByteChannel).
If you need the header buffer at a later stage you have to create a copy.parse in interface ParsableBoxparse in class AbstractContainerBoxdataSource - the source for this boxheader - the box' already parsed header (create copy if you need it
later as it will be overwritten)contentSize - remaining bytes of this boxboxParser - use it to parse sub-boxes.java.io.IOException - in case of an error during a read operationpublic void getBox(java.nio.channels.WritableByteChannel writableByteChannel)
throws java.io.IOException
BoxwritableByteChannel.getBox in interface BoxgetBox in class AbstractContainerBoxwritableByteChannel - the box's sinkjava.io.IOException - in case of problems with the Channelpublic java.lang.String toString()
toString in class BasicContainerprotected final long parseVersionAndFlags(java.nio.ByteBuffer content)
content - the ByteBuffer that contains the version & flagprotected final void writeVersionAndFlags(java.nio.ByteBuffer bb)
protected java.nio.ByteBuffer getHeader()
getHeader in class AbstractContainerBoxCopyright © 2020. All rights reserved.