public final class MediaDataBox extends java.lang.Object implements ParsableBox, java.io.Closeable
SampleTableBox).StaticChunkOffsetBox);
so Media Data Box headers and free space may easily be skipped, and files without any box structure may
also be referenced and used.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
| Constructor and Description |
|---|
MediaDataBox() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
getBox(java.nio.channels.WritableByteChannel writableByteChannel)
Writes the complete box - size | 4-cc | content - to the given
writableByteChannel. |
long |
getSize() |
java.lang.String |
getType()
The box's 4-cc type.
|
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]).
|
public static final java.lang.String TYPE
public java.lang.String getType()
Boxpublic void getBox(java.nio.channels.WritableByteChannel writableByteChannel)
throws java.io.IOException
BoxwritableByteChannel.@DoNotParseDetail public void parse(java.nio.channels.ReadableByteChannel dataSource, java.nio.ByteBuffer header, long contentSize, BoxParser boxParser) throws java.io.IOException
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 ParsableBoxdataSource - 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 close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2020. All rights reserved.