com.sun.jimi.core.encoder.sunraster
Class SpecificEncoder

java.lang.Object
  |
  +--com.sun.jimi.core.encoder.sunraster.SpecificEncoder
Direct Known Subclasses:
PaletteSunRasterEncoder, RGBSunRasterEncoder

public abstract class SpecificEncoder
extends java.lang.Object

Base class for encoders for specific types of SunRaster images.


Constructor Summary
SpecificEncoder()
           
 
Method Summary
abstract  void doImageEncode()
          Performs the encoding of the image and writes it to the stream.
protected  SunRasterHeader getHeader()
          Returns the header for the image.
protected  AdaptiveRasterImage getJimiImage()
          Returns the JimiImage to read information from.
protected  java.io.OutputStream getOutputStream()
          Returns the outputstream to write to.
 void initEncoder(SunRasterHeader header, java.io.OutputStream output, AdaptiveRasterImage jimiImage)
          Initialize the encoder with the information necessary to write an encoded image.
protected  void writeHeader()
          Writes the header to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecificEncoder

public SpecificEncoder()
Method Detail

initEncoder

public void initEncoder(SunRasterHeader header,
                        java.io.OutputStream output,
                        AdaptiveRasterImage jimiImage)
Initialize the encoder with the information necessary to write an encoded image.
Parameters:
header - The header for the image.
output - The stream to write the encoded image to.
jimiImage - the JimiImage to draw information from.

doImageEncode

public abstract void doImageEncode()
                            throws JimiException
Performs the encoding of the image and writes it to the stream.

writeHeader

protected void writeHeader()
                    throws java.io.IOException
Writes the header to the stream.

getHeader

protected SunRasterHeader getHeader()
Returns the header for the image.

getOutputStream

protected java.io.OutputStream getOutputStream()
Returns the outputstream to write to.

getJimiImage

protected AdaptiveRasterImage getJimiImage()
Returns the JimiImage to read information from.