largeBox, type
boxParser, dataSource
Constructor and Description |
---|
FullContainerBox(String type) |
Modifier and Type | Method and Description |
---|---|
<T extends Box> |
getBoxes(Class<T> clazz)
Gets all child boxes of the given type.
|
int |
getFlags() |
protected ByteBuffer |
getHeader() |
int |
getVersion() |
void |
parse(DataSource dataSource,
ByteBuffer header,
long contentSize,
BoxParser boxParser)
Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).
|
protected long |
parseVersionAndFlags(ByteBuffer content)
Parses the version/flags header and returns the remaining box size.
|
void |
setFlags(int flags) |
void |
setVersion(int version) |
String |
toString() |
protected void |
writeVersionAndFlags(ByteBuffer bb) |
getBox, getOffset, getParent, getSize, getType, setParent
addBox, getBoxes, getBoxes, getByteBuffer, getContainerSize, hasNext, next, parseContainer, remove, setBoxes, writeContainer
public FullContainerBox(String type)
public int getVersion()
getVersion
in interface FullBox
public void setVersion(int version)
setVersion
in interface FullBox
public <T extends Box> List<T> getBoxes(Class<T> clazz)
Container
null
.getBoxes
in interface Container
getBoxes
in class BasicContainer
T
- type of boxes to getclazz
- child box's typepublic void parse(DataSource dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
Box
contentSize
, 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 Box
parse
in class AbstractContainerBox
dataSource
- 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.IOException
- in case of an error during a read operationpublic String toString()
toString
in class BasicContainer
protected final long parseVersionAndFlags(ByteBuffer content)
content
- the ByteBuffer
that contains the version & flagprotected final void writeVersionAndFlags(ByteBuffer bb)
protected ByteBuffer getHeader()
getHeader
in class AbstractContainerBox
Copyright © 2014. All rights reserved.