org.apache.batik.ext.awt.image.spi

Class JDKRegistryEntry

public class JDKRegistryEntry extends AbstractRegistryEntry implements URLRegistryEntry

This Image tag registy entry is setup to wrap the core JDK Image stream tools.
Nested Class Summary
static classJDKRegistryEntry.MyImgObs
Field Summary
static floatPRIORITY
The priority of this entry.
Constructor Summary
JDKRegistryEntry()
Method Summary
FilterhandleURL(ParsedURL purl, boolean needRawData)
Decode the URL into a RenderableImage
booleanisCompatibleURL(ParsedURL purl)
Check if the Stream references an image that can be handled by this format handler.
RenderedImageloadImage(Image img, DeferRable dr)

Field Detail

PRIORITY

public static final float PRIORITY
The priority of this entry. This entry should in most cases be the last entry. but if one wishes one could set a priority higher and be called afterwords

Constructor Detail

JDKRegistryEntry

public JDKRegistryEntry()

Method Detail

handleURL

public Filter handleURL(ParsedURL purl, boolean needRawData)
Decode the URL into a RenderableImage

Parameters: purl URL of the image. needRawData If true the image returned should not have any default color correction the file may specify applied.

isCompatibleURL

public boolean isCompatibleURL(ParsedURL purl)
Check if the Stream references an image that can be handled by this format handler. The input stream passed in should be assumed to support mark and reset. If this method throws a StreamCorruptedException then the InputStream will be closed and a new one opened (if possible). This method should only throw a StreamCorruptedException if it is unable to restore the state of the InputStream (i.e. mark/reset fails basically).

loadImage

public RenderedImage loadImage(Image img, DeferRable dr)
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.