Copyright 2012-04-26 Werner Randelshofer

org.monte.media.avi
Class AbstractAVIStream.DataChunk

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

protected class AbstractAVIStream.DataChunk
extends AbstractAVIStream.Chunk

Data Chunk.


Field Summary
protected  javax.imageio.stream.ImageOutputStream data
           
protected  boolean finished
           
 
Fields inherited from class org.monte.media.avi.AbstractAVIStream.Chunk
chunkType, offset
 
Constructor Summary
AbstractAVIStream.DataChunk(java.lang.String name)
          Creates a new DataChunk at the current position of the ImageOutputStream.
AbstractAVIStream.DataChunk(java.lang.String name, long dataSize)
          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()
           
 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

data

protected javax.imageio.stream.ImageOutputStream data

finished

protected boolean finished
Constructor Detail

AbstractAVIStream.DataChunk

public AbstractAVIStream.DataChunk(java.lang.String name)
                            throws java.io.IOException
Creates a new DataChunk at the current position of the ImageOutputStream.

Parameters:
name - The name of the chunk.
Throws:
java.io.IOException

AbstractAVIStream.DataChunk

public AbstractAVIStream.DataChunk(java.lang.String name,
                                   long dataSize)
                            throws java.io.IOException
Creates a new DataChunk at the current position of the ImageOutputStream.

Parameters:
name - The name of the chunk.
dataSize - The size of the chunk data, or -1 if not known.
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


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 2012-04-26 Werner Randelshofer