FileDocCategorySizeDatePackage
StaticChunkOffsetBox.javaAPI Docmp4parser 1.0-RC-172079Wed Dec 19 20:10:38 GMT 2012com.coremedia.iso.boxes

StaticChunkOffsetBox

public class StaticChunkOffsetBox extends ChunkOffsetBox
The chunk offset table gives the index of each chunk into the containing file. Defined in ISO/IEC 14496-12.

Fields Summary
public static final String
TYPE
private long[]
chunkOffsets
Constructors Summary
public StaticChunkOffsetBox()


      
        super(TYPE);
    
Methods Summary
public void_parseDetails(java.nio.ByteBuffer content)

        parseVersionAndFlags(content);
        int entryCount = l2i(IsoTypeReader.readUInt32(content));
        chunkOffsets = new long[entryCount];
        for (int i = 0; i < entryCount; i++) {
            chunkOffsets[i] = IsoTypeReader.readUInt32(content);
        }

    
public long[]getChunkOffsets()

        return chunkOffsets;
    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        writeVersionAndFlags(byteBuffer);
        IsoTypeWriter.writeUInt32(byteBuffer, chunkOffsets.length);
        for (long chunkOffset : chunkOffsets) {
            IsoTypeWriter.writeUInt32(byteBuffer, chunkOffset);
        }
    
protected longgetContentSize()

        return 8 + chunkOffsets.length * 4;
    
public voidsetChunkOffsets(long[] chunkOffsets)

        this.chunkOffsets = chunkOffsets;