com.sun.jimi.core
Class JimiSingleImageRasterEncoder

java.lang.Object
  |
  +--com.sun.jimi.core.util.ProgressMonitorSupport
        |
        +--com.sun.jimi.core.JimiSingleImageRasterEncoder
Direct Known Subclasses:
APFEncoder, JPGEncoder

public abstract class JimiSingleImageRasterEncoder
extends ProgressMonitorSupport
implements JimiEncoder

Base class for encoders of single-image formats.


Fields inherited from class com.sun.jimi.core.util.ProgressMonitorSupport
currentProgressLevel, progressListener
 
Constructor Summary
JimiSingleImageRasterEncoder()
           
 
Method Summary
abstract  void doEncodeImage(JimiRasterImage jimiImage, java.io.OutputStream output)
          Encode an image to a stream.
 void encodeImage(JimiImage jimiImage, java.io.OutputStream output)
          Support implementation to perform initialization and call doEncodeImage.
 void encodeImage(JimiImage jimiImage, java.io.OutputStream output, ProgressListener listener)
          Support implementation to perform initialization and call doEncodeImage.
 void encodeImages(JimiImageEnumeration jimiImages, java.io.OutputStream output)
          Support implementation to perform initialization and call doEncodeImage with the first image of the series.
 void encodeImages(JimiImageEnumeration jimiImages, java.io.OutputStream output, ProgressListener listener)
          Support implementation to perform initialization and call doEncodeImage with the first image of the series.
 void setProgress(int progressLevel)
          Set the progress level.
 
Methods inherited from class com.sun.jimi.core.util.ProgressMonitorSupport
setProgressListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JimiSingleImageRasterEncoder

public JimiSingleImageRasterEncoder()
Method Detail

encodeImage

public final void encodeImage(JimiImage jimiImage,
                              java.io.OutputStream output)
                       throws JimiException
Support implementation to perform initialization and call doEncodeImage.

encodeImage

public final void encodeImage(JimiImage jimiImage,
                              java.io.OutputStream output,
                              ProgressListener listener)
                       throws JimiException
Support implementation to perform initialization and call doEncodeImage.

doEncodeImage

public abstract void doEncodeImage(JimiRasterImage jimiImage,
                                   java.io.OutputStream output)
                            throws JimiException,
                                   java.io.IOException
Encode an image to a stream.
Parameters:
jimiImage - the image to encode
output - the stream to write the image to

encodeImages

public final void encodeImages(JimiImageEnumeration jimiImages,
                               java.io.OutputStream output)
                        throws JimiException
Support implementation to perform initialization and call doEncodeImage with the first image of the series.
Specified by:
encodeImages in interface JimiEncoder

encodeImages

public final void encodeImages(JimiImageEnumeration jimiImages,
                               java.io.OutputStream output,
                               ProgressListener listener)
                        throws JimiException
Support implementation to perform initialization and call doEncodeImage with the first image of the series.
Specified by:
encodeImages in interface JimiEncoder

setProgress

public void setProgress(int progressLevel)
Set the progress level.
Parameters:
progressLevel - the level of progress, between 0 and 1000 inclusive
Overrides:
setProgress in class ProgressMonitorSupport