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.
Constructor Summary |
IsoFile()
|
IsoFile(java.nio.channels.ReadableByteChannel byteChannel)
|
IsoFile(java.nio.channels.ReadableByteChannel byteChannel,
BoxParser boxParser)
|
Methods inherited from class com.coremedia.iso.boxes.AbstractContainerBox |
addBox, getBoxes, getBoxes, getBoxes, getContent, getContentSize, parse, parseChildBoxes, removeBox, setBoxes, writeChildBoxes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
boxParser
protected BoxParser boxParser
IsoFile
public IsoFile()
IsoFile
public IsoFile(java.nio.channels.ReadableByteChannel byteChannel)
throws java.io.IOException
- Throws:
java.io.IOException
IsoFile
public IsoFile(java.nio.channels.ReadableByteChannel byteChannel,
BoxParser boxParser)
throws java.io.IOException
- Throws:
java.io.IOException
createBoxParser
protected BoxParser createBoxParser()
_parseDetails
public void _parseDetails(java.nio.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(java.nio.channels.ReadableByteChannel inFC,
java.nio.ByteBuffer header,
long contentSize,
AbstractBoxParser abstractBoxParser)
throws java.io.IOException
- Throws:
java.io.IOException
toString
@DoNotParseDetail
public java.lang.String toString()
- Overrides:
toString
in class AbstractContainerBox
fourCCtoBytes
@DoNotParseDetail
public static byte[] fourCCtoBytes(java.lang.String fourCC)
bytesToFourCC
@DoNotParseDetail
public static java.lang.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(java.nio.channels.WritableByteChannel os)
throws java.io.IOException
- Specified by:
getBox
in interface Box
- Overrides:
getBox
in class AbstractBox
- Throws:
java.io.IOException
Copyright © 2012. All Rights Reserved.