fi.faidon.jis
Class ImageSerializer

java.lang.Object
  |
  +--fi.faidon.jis.ImageSaverInterface
        |
        +--fi.faidon.jis.ImageSerializer
All Implemented Interfaces:
java.io.Serializable

public class ImageSerializer
extends ImageSaverInterface
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String FORMAT_CODE
           
static java.lang.String FORMAT_COMPLETE_NAME
           
static java.lang.String FORMAT_EXTENSION
           
static int NO_COMPRESSION
           
 
Fields inherited from class fi.faidon.jis.ImageSaverInterface
saveImage, savePath
 
Constructor Summary
ImageSerializer()
          Default constructor.
ImageSerializer(java.awt.Image img)
          Use this constructor when you want to serialize an image onto disk.
 
Method Summary
 int checkSave()
          Return ImageObserver constants for indicating the state of the image saving.
 java.awt.image.ColorModel getColorModel()
          Get the color model of the image.
 int getCompression()
          Get the compression used.
 java.lang.String getFormatCode()
          ImageSaverInterface method implementations.
 java.lang.String getFormatExtension()
           
 java.lang.String getFormatString()
           
 java.awt.Image getImage()
          Get the image.
 int getImageHeight()
          Get the height of the image.
 int getImageWidth()
          Get the width of the image.
 boolean saveIt()
           
 void setCompression(int c)
          Set the compression used.
 void setImage(java.awt.Image img)
          Set the image to serialize.
 
Methods inherited from class fi.faidon.jis.ImageSaverInterface
getSaveImage, getSavePath, setSaveImage, setSavePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_COMPRESSION

public static final int NO_COMPRESSION
See Also:
Constant Field Values

FORMAT_CODE

public static final java.lang.String FORMAT_CODE
See Also:
Constant Field Values

FORMAT_COMPLETE_NAME

public static final java.lang.String FORMAT_COMPLETE_NAME
See Also:
Constant Field Values

FORMAT_EXTENSION

public static final java.lang.String FORMAT_EXTENSION
See Also:
Constant Field Values
Constructor Detail

ImageSerializer

public ImageSerializer()
Default constructor. Use this when you want to read the serialized image.


ImageSerializer

public ImageSerializer(java.awt.Image img)
Use this constructor when you want to serialize an image onto disk.

Method Detail

getFormatCode

public java.lang.String getFormatCode()
ImageSaverInterface method implementations.

Specified by:
getFormatCode in class ImageSaverInterface

getFormatString

public java.lang.String getFormatString()
Specified by:
getFormatString in class ImageSaverInterface

getFormatExtension

public java.lang.String getFormatExtension()
Specified by:
getFormatExtension in class ImageSaverInterface

saveIt

public boolean saveIt()
Specified by:
saveIt in class ImageSaverInterface

checkSave

public int checkSave()
Return ImageObserver constants for indicating the state of the image saving.

Specified by:
checkSave in class ImageSaverInterface

getImage

public java.awt.Image getImage()
Get the image.


setImage

public void setImage(java.awt.Image img)
Set the image to serialize.


getCompression

public int getCompression()
Get the compression used.


setCompression

public void setCompression(int c)
Set the compression used.


getColorModel

public java.awt.image.ColorModel getColorModel()
Get the color model of the image. This is known after serializing the image or after reading it from disk.


getImageWidth

public int getImageWidth()
Get the width of the image. This is known after serializing the image or after reading it from disk.


getImageHeight

public int getImageHeight()
Get the height of the image. This is known after serializing the image or after reading it from disk.