Copyright 2013-01-06 Werner Randelshofer

org.monte.media.avi
Class AbstractAVIStream.FixedSizeDataChunk

java.lang.Object
  extended by org.monte.media.avi.AbstractAVIStream.Chunk
      extended by org.monte.media.avi.AbstractAVIStream.FixedSizeDataChunk
Enclosing class:
AbstractAVIStream

protected class AbstractAVIStream.FixedSizeDataChunk
extends AbstractAVIStream.Chunk

A DataChunk with a fixed size.


Field Summary
protected  boolean finished
           
protected  long fixedSize
           
 
Fields inherited from class org.monte.media.avi.AbstractAVIStream.Chunk
chunkType, offset
 
Constructor Summary
AbstractAVIStream.FixedSizeDataChunk(int chunkType, long fixedSize)
          Creates a new DataChunk at the current position of the ImageOutputStream.
 
Method Summary
 void finish()
          Writes the chunk to the ImageOutputStream and disposes it.
 long getOffset()
          Returns the offset of this chunk to the beginning of the random access file
 javax.imageio.stream.ImageOutputStream getOutputStream()
           
 void seekToEndOfChunk()
           
 void seekToStartOfData()
           
 long size()
          Returns the size of the chunk including the size of the chunk header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

finished

protected boolean finished

fixedSize

protected long fixedSize
Constructor Detail

AbstractAVIStream.FixedSizeDataChunk

public AbstractAVIStream.FixedSizeDataChunk(int chunkType,
                                            long fixedSize)
                                     throws java.io.IOException
Creates a new DataChunk at the current position of the ImageOutputStream.

Parameters:
chunkType - The chunkType of the chunk.
Throws:
java.io.IOException
Method Detail

getOutputStream

public javax.imageio.stream.ImageOutputStream getOutputStream()

getOffset

public long getOffset()
Returns the offset of this chunk to the beginning of the random access file


seekToStartOfData

public void seekToStartOfData()
                       throws java.io.IOException
Throws:
java.io.IOException

seekToEndOfChunk

public void seekToEndOfChunk()
                      throws java.io.IOException
Throws:
java.io.IOException

finish

public void finish()
            throws java.io.IOException
Description copied from class: AbstractAVIStream.Chunk
Writes the chunk to the ImageOutputStream and disposes it.

Specified by:
finish in class AbstractAVIStream.Chunk
Throws:
java.io.IOException

size

public long size()
Description copied from class: AbstractAVIStream.Chunk
Returns the size of the chunk including the size of the chunk header.

Specified by:
size in class AbstractAVIStream.Chunk
Returns:
The size of the chunk.

Copyright 2013-01-06 Werner Randelshofer