com.coremedia.iso
Class IsoFile
java.lang.Object
com.coremedia.iso.boxes.AbstractBox
com.coremedia.iso.boxes.AbstractContainerBox
com.coremedia.iso.IsoFile
- All Implemented Interfaces:
- Box, ContainerBox
@DoNotParseDetail
public class IsoFile
- extends AbstractContainerBox
The most upper container for ISO Boxes. It is a container box that is a file.
Uses IsoBufferWrapper to access the underlying file.
Methods inherited from class com.coremedia.iso.boxes.AbstractContainerBox |
addBox, getBoxes, getBoxes, getBoxes, getContent, getContentSize, parse, parseChildBoxes, removeBox, setBoxes, writeChildBoxes |
boxParser
protected BoxParser boxParser
IsoFile
public IsoFile()
IsoFile
public IsoFile(ReadableByteChannel byteChannel)
throws IOException
- Throws:
IOException
IsoFile
public IsoFile(ReadableByteChannel byteChannel,
BoxParser boxParser)
throws IOException
- Throws:
IOException
createBoxParser
protected BoxParser createBoxParser()
_parseDetails
public void _parseDetails(ByteBuffer content)
- Description copied from class:
AbstractBox
- Implement the actual parsing of the box's fields here. External classes will always call
AbstractBox.parseDetails()
which encapsulates the call to this method with some safeguards.
- Overrides:
_parseDetails
in class AbstractContainerBox
parse
public void parse(ReadableByteChannel inFC,
ByteBuffer header,
long contentSize,
AbstractBoxParser abstractBoxParser)
throws IOException
- Throws:
IOException
toString
@DoNotParseDetail
public String toString()
- Overrides:
toString
in class AbstractContainerBox
fourCCtoBytes
@DoNotParseDetail
public static byte[] fourCCtoBytes(String fourCC)
bytesToFourCC
@DoNotParseDetail
public static String bytesToFourCC(byte[] type)
getNumOfBytesToFirstChild
public long getNumOfBytesToFirstChild()
- Description copied from class:
AbstractContainerBox
- The number of bytes from box start (first length byte) to the
first length byte of the first child box
- Specified by:
getNumOfBytesToFirstChild
in interface ContainerBox
- Overrides:
getNumOfBytesToFirstChild
in class AbstractContainerBox
- Returns:
- offset to first child box
getSize
public long getSize()
- Specified by:
getSize
in interface Box
- Overrides:
getSize
in class AbstractBox
getIsoFile
public IsoFile getIsoFile()
- Specified by:
getIsoFile
in interface ContainerBox
- Overrides:
getIsoFile
in class AbstractBox
getMovieBox
@DoNotParseDetail
public MovieBox getMovieBox()
- Shortcut to get the MovieBox since it is often needed and present in
nearly all ISO 14496 files (at least if they are derived from MP4 ).
- Returns:
- the MovieBox or
null
getBox
public void getBox(WritableByteChannel os)
throws IOException
- Specified by:
getBox
in interface Box
- Overrides:
getBox
in class AbstractBox
- Throws:
IOException
Copyright © 2012. All Rights Reserved.