|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jimi.core.util.ProgressMonitorSupport | +--com.sun.jimi.core.compat.JimiDecoderBase
Compatibility adapter for ease of porting Jimi 1.0 decoders to Jimi 1.1
Field Summary | |
protected boolean |
busyDecoding
|
protected java.util.Vector |
cleanupCommands
|
protected JimiDecodingController |
currentController
|
protected JimiImageHandle |
currentHandle
|
protected java.lang.Object |
decodingLock
|
protected boolean |
error
|
static int |
ERROR
The decoder has encountered an error. |
protected JimiImageFactory |
factory
|
protected boolean |
finishedDecoding
|
static int |
IMAGEAVAIL
The decoder has decode an image into the JIMImage structure. |
static int |
INFOAVAIL
The decoder has decoded enough of the image into JIMIImage structure to allow the initialiasing of image consumers |
protected java.io.InputStream |
input
|
protected AdaptiveRasterImage |
jimiImage
|
static int |
MOREIMAGES
The decoder considers it is possible that there are more images available in this InputStream. |
static int |
MULTIIMAGE
This decoder is capable of decoding multiple images if the input source of the image data contains multiple images. |
static int |
UNKNOWNCOUNT
Constant meaning the number of images is not known. |
Fields inherited from class com.sun.jimi.core.util.ProgressMonitorSupport |
currentProgressLevel,
progressListener |
Constructor Summary | |
JimiDecoderBase()
|
Method Summary | |
void |
addCleanupCommand(java.lang.Runnable run)
Commands to run when decoding has ended. |
protected AdaptiveRasterImage |
createAdaptiveRasterImage()
Factory method for creating new adaptive raster images. |
protected AdaptiveRasterImage |
createAdaptiveRasterImage(int w,
int h,
java.awt.image.ColorModel cm)
Factory method for creating new adaptive raster images. |
protected JimiDecodingController |
decodeNextImage()
Decode the next available image. |
protected abstract boolean |
driveDecoder()
Called repeatedly during image operations. |
protected void |
finishedDecode()
Called when decoding an image has finished. |
protected abstract void |
freeDecoder()
Called when no more decoding requests will be made. |
protected int |
getCapabilities()
Query for special capabilities. |
int |
getNumberOfImages()
Find out how many images are available. |
protected abstract int |
getState()
Get the decoding state. |
protected abstract void |
initDecoder(java.io.InputStream in,
AdaptiveRasterImage ji)
Called before any requests for images are made. |
ImageSeriesDecodingController |
initDecoding(JimiImageFactory factory,
java.io.InputStream input)
Initialize decoding of a single image. |
protected void |
jimiImageCreated(MutableJimiImage jimiImage)
Callback used when the back-end of an AdaptiveRasterImage has been created. |
boolean |
mustWaitForOptions()
Check whether the decoder returns images which must be fully decoded before their options are available. |
void |
run()
Drive the encoder |
void |
setFinished()
Called if no further images will be needed. |
void |
skipImage()
Skip the next image. |
boolean |
usesChanneledData()
Check whether the format needs to set individual channels of image data separately. |
protected void |
waitReady()
Wait until the decoder is idle. |
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 |
public static final int ERROR
public static final int INFOAVAIL
public static final int IMAGEAVAIL
public static final int MOREIMAGES
public static final int MULTIIMAGE
getCapabilities
public static final int UNKNOWNCOUNT
protected AdaptiveRasterImage jimiImage
protected JimiImageFactory factory
protected java.io.InputStream input
protected JimiDecodingController currentController
protected JimiImageHandle currentHandle
protected boolean error
protected volatile boolean busyDecoding
protected java.lang.Object decodingLock
protected java.util.Vector cleanupCommands
protected boolean finishedDecoding
Constructor Detail |
public JimiDecoderBase()
Method Detail |
public ImageSeriesDecodingController initDecoding(JimiImageFactory factory, java.io.InputStream input)
factory
- the factory to create a JimiImage frominput
- the stream to read image data fromprotected void jimiImageCreated(MutableJimiImage jimiImage)
public void run()
protected AdaptiveRasterImage createAdaptiveRasterImage()
protected AdaptiveRasterImage createAdaptiveRasterImage(int w, int h, java.awt.image.ColorModel cm)
protected JimiDecodingController decodeNextImage()
protected void finishedDecode()
protected void waitReady()
protected abstract void initDecoder(java.io.InputStream in, AdaptiveRasterImage ji) throws JimiException
protected abstract boolean driveDecoder() throws JimiException
protected abstract void freeDecoder() throws JimiException
protected abstract int getState()
protected int getCapabilities()
public void skipImage() throws JimiException
public int getNumberOfImages()
public boolean usesChanneledData()
public boolean mustWaitForOptions()
public void setFinished()
public void addCleanupCommand(java.lang.Runnable run)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |