com.sun.jimi.core
Class JimiRasterDecoderSupport

java.lang.Object
  |
  +--com.sun.jimi.core.util.ProgressMonitorSupport
        |
        +--com.sun.jimi.core.JimiRasterDecoderSupport
Direct Known Subclasses:
JimiMultiImageRasterDecoder, JimiSingleImageRasterDecoder

public abstract class JimiRasterDecoderSupport
extends ProgressMonitorSupport
implements JimiRasterDecoder

Base support class for JimiDecoders.

See Also:
JimiSingleImageDecoder, JimiMultiImageDecoder

Field Summary
protected  java.util.Vector cleanupCommands
          cleanup commands
protected  JimiImageFactory factory
          factory to create JimiImages from
protected  java.io.InputStream input
          stream to read image data from
protected  boolean noMoreRequests
          no more images will be requested
 
Fields inherited from class com.sun.jimi.core.util.ProgressMonitorSupport
currentProgressLevel, progressListener
 
Constructor Summary
JimiRasterDecoderSupport()
           
 
Method Summary
 void addCleanupCommand(java.lang.Runnable run)
          Commands to run when decoding has ended.
protected  void cleanup()
           
protected  java.io.InputStream getInput()
          Get the stream to read image data from.
protected  JimiImageFactory getJimiImageFactory()
          Get a factory for creating JimiImages with.
protected  void init(JimiImageFactory factory, java.io.InputStream input)
          Initialize required fields.
 void setFinished()
          Called if no further images will be needed.
 
Methods inherited from class com.sun.jimi.core.util.ProgressMonitorSupport
setProgress, setProgressListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

input

protected java.io.InputStream input
stream to read image data from

factory

protected JimiImageFactory factory
factory to create JimiImages from

noMoreRequests

protected boolean noMoreRequests
no more images will be requested

cleanupCommands

protected java.util.Vector cleanupCommands
cleanup commands
Constructor Detail

JimiRasterDecoderSupport

public JimiRasterDecoderSupport()
Method Detail

init

protected void init(JimiImageFactory factory,
                    java.io.InputStream input)
Initialize required fields.
Parameters:
factory - factory to create JimiImages from
input - stream to read image data from

getJimiImageFactory

protected JimiImageFactory getJimiImageFactory()
Get a factory for creating JimiImages with.
Returns:
the factory

getInput

protected java.io.InputStream getInput()
Get the stream to read image data from.
Returns:
the stream

setFinished

public void setFinished()
Called if no further images will be needed.

addCleanupCommand

public void addCleanupCommand(java.lang.Runnable run)
Commands to run when decoding has ended.

cleanup

protected void cleanup()