com.coremedia.iso
Class IsoFile

java.lang.Object
  extended by com.coremedia.iso.boxes.AbstractBox
      extended by com.coremedia.iso.boxes.AbstractContainerBox
          extended by 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.


Field Summary
protected  BoxParser boxParser
           
 
Fields inherited from class com.coremedia.iso.boxes.AbstractContainerBox
boxes
 
Fields inherited from class com.coremedia.iso.boxes.AbstractBox
deadBytes, type
 
Constructor Summary
IsoFile()
           
IsoFile(ReadableByteChannel byteChannel)
           
IsoFile(ReadableByteChannel byteChannel, BoxParser boxParser)
           
 
Method Summary
 void _parseDetails(ByteBuffer content)
          Implement the actual parsing of the box's fields here.
static String bytesToFourCC(byte[] type)
           
protected  BoxParser createBoxParser()
           
static byte[] fourCCtoBytes(String fourCC)
           
 void getBox(WritableByteChannel os)
           
 IsoFile getIsoFile()
           
 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 ).
 long getNumOfBytesToFirstChild()
          The number of bytes from box start (first length byte) to the first length byte of the first child box
 long getSize()
           
 void parse(ReadableByteChannel inFC, ByteBuffer header, long contentSize, AbstractBoxParser abstractBoxParser)
           
 String toString()
           
 
Methods inherited from class com.coremedia.iso.boxes.AbstractContainerBox
addBox, getBoxes, getBoxes, getBoxes, getContent, getContentSize, parse, parseChildBoxes, removeBox, setBoxes, writeChildBoxes
 
Methods inherited from class com.coremedia.iso.boxes.AbstractBox
getDeadBytes, getHeader, getParent, getType, getUserType, isParsed, parseDetails, setDeadBytes, setParent, setUserType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.coremedia.iso.boxes.ContainerBox
getParent
 
Methods inherited from interface com.coremedia.iso.boxes.Box
getType, setParent
 

Field Detail

boxParser

protected BoxParser boxParser
Constructor Detail

IsoFile

public IsoFile()

IsoFile

public IsoFile(ReadableByteChannel byteChannel)
        throws IOException
Throws:
IOException

IsoFile

public IsoFile(ReadableByteChannel byteChannel,
               BoxParser boxParser)
        throws IOException
Throws:
IOException
Method Detail

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.