Class FreeBox
- java.lang.Object
-
- org.mp4parser.boxes.iso14496.part12.FreeBox
-
- All Implemented Interfaces:
Box,ParsableBox
public class FreeBox extends Object implements ParsableBox
4cc = ""free""
A free box. Just a placeholder to enable editing without rewriting the whole file.
-
-
Method Summary
Modifier and Type Method Description voidaddAndReplace(ParsableBox parsableBox)booleanequals(Object o)voidgetBox(WritableByteChannel os)Writes the complete box - size | 4-cc | content - to the givenwritableByteChannel.ByteBuffergetData()longgetSize()StringgetType()The box's 4-cc type.inthashCode()voidparse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser)Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).voidsetData(ByteBuffer data)
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getData
public ByteBuffer getData()
-
setData
public void setData(ByteBuffer data)
-
getBox
public void getBox(WritableByteChannel os) throws IOException
Description copied from interface:BoxWrites the complete box - size | 4-cc | content - to the givenwritableByteChannel.- Specified by:
getBoxin interfaceBox- Parameters:
os- the box's sink- Throws:
IOException- in case of problems with theChannel
-
parse
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
Description copied from interface:ParsableBoxParses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]). The remaining size of the box is thecontentSize,contentSizenumber of bytes should be read from the box source (readableByteChannel). If you need theheaderbuffer at a later stage you have to create a copy.- Specified by:
parsein interfaceParsableBox- Parameters:
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.- Throws:
IOException- in case of an error during a read operation
-
addAndReplace
public void addAndReplace(ParsableBox parsableBox)
-
-