|
|||||||||
| Home >> All >> org >> ydp >> [ jai overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.ydp.jai
Class ImageEncoderImpl

java.lang.Objectorg.ydp.jai.ImageEncoderImpl
- All Implemented Interfaces:
- ImageEncoder
- Direct Known Subclasses:
- PNGImageEncoder
- public abstract class ImageEncoderImpl
- extends java.lang.Object
- implements ImageEncoder
- extends java.lang.Object
A partial implementation of the ImageEncoder interface useful for subclassing.
This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.
| Field Summary | |
protected java.io.OutputStream |
output
The OutputStream associcted with this ImageEncoder. |
protected ImageEncodeParam |
param
The ImageEncodeParam object associcted with this ImageEncoder. |
| Constructor Summary | |
ImageEncoderImpl(java.io.OutputStream output,
ImageEncodeParam param)
Constructs an ImageEncoderImpl with a given OutputStream and ImageEncoderParam instance. |
|
| Method Summary | |
void |
encode(java.awt.image.Raster ras,
java.awt.image.ColorModel cm)
Encodes a Raster with a given ColorModel and writes the output to the OutputStream associated with this ImageEncoder. |
abstract void |
encode(java.awt.image.RenderedImage im)
Encodes a RenderedImage and writes the output to the OutputStream associated with this ImageEncoder. |
java.io.OutputStream |
getOutputStream()
Returns the OutputStream associated with this ImageEncoder. |
ImageEncodeParam |
getParam()
Returns the current parameters as an instance of the ImageEncodeParam interface. |
void |
setParam(ImageEncodeParam param)
Sets the current parameters to an instance of the ImageEncodeParam interface. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
output
protected java.io.OutputStream output
- The OutputStream associcted with this ImageEncoder.
param
protected ImageEncodeParam param
- The ImageEncodeParam object associcted with this ImageEncoder.
| Constructor Detail |
ImageEncoderImpl
public ImageEncoderImpl(java.io.OutputStream output, ImageEncodeParam param)
- Constructs an ImageEncoderImpl with a given OutputStream
and ImageEncoderParam instance.
| Method Detail |
getParam
public ImageEncodeParam getParam()
- Returns the current parameters as an instance of the
ImageEncodeParam interface. Concrete implementations of this
interface will return corresponding concrete implementations of
the ImageEncodeParam interface. For example, a JPEGImageEncoder
will return an instance of JPEGEncodeParam.
- Specified by:
getParamin interfaceImageEncoder
setParam
public void setParam(ImageEncodeParam param)
- Sets the current parameters to an instance of the
ImageEncodeParam interface. Concrete implementations
of ImageEncoder may throw a RuntimeException if the
params argument is not an instance of the appropriate
subclass or subinterface. For example, a JPEGImageEncoder
will expect param to be an instance of JPEGEncodeParam.
- Specified by:
setParamin interfaceImageEncoder
getOutputStream
public java.io.OutputStream getOutputStream()
- Returns the OutputStream associated with this ImageEncoder.
- Specified by:
getOutputStreamin interfaceImageEncoder
encode
public void encode(java.awt.image.Raster ras, java.awt.image.ColorModel cm) throws java.io.IOException
- Encodes a Raster with a given ColorModel and writes the output
to the OutputStream associated with this ImageEncoder.
- Specified by:
encodein interfaceImageEncoder
encode
public abstract void encode(java.awt.image.RenderedImage im) throws java.io.IOException
- Encodes a RenderedImage and writes the output to the
OutputStream associated with this ImageEncoder.
- Specified by:
encodein interfaceImageEncoder
|
|||||||||
| Home >> All >> org >> ydp >> [ jai overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.ydp.jai.ImageEncoderImpl