Modifier and Type | Method and Description |
---|---|
void |
addAndReplace(Box box) |
boolean |
equals(Object o) |
void |
getBox(WritableByteChannel os)
Writes the complete box - size | 4-cc | content - to the given
writableByteChannel . |
ByteBuffer |
getData() |
long |
getOffset()
Returns the position of the box in the original file.
|
Container |
getParent() |
long |
getSize() |
String |
getType()
The box's 4-cc type.
|
int |
hashCode() |
void |
parse(DataSource dataSource,
ByteBuffer header,
long contentSize,
BoxParser boxParser)
Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).
|
void |
setData(ByteBuffer data) |
void |
setParent(Container parent) |
public static final String TYPE
public long getOffset()
Box
public ByteBuffer getData()
public void setData(ByteBuffer data)
public void getBox(WritableByteChannel os) throws IOException
Box
writableByteChannel
.getBox
in interface Box
os
- the box's sinkIOException
- in case of problems with the Channel
public 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
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 void addAndReplace(Box box)
Copyright © 2017. All rights reserved.