org.apache.cocoon.components.url
Class StreamJDKRegistryEntry

java.lang.Object
  extended byorg.apache.batik.ext.awt.image.spi.AbstractRegistryEntry
      extended byorg.apache.cocoon.components.url.StreamJDKRegistryEntry
All Implemented Interfaces:
org.apache.batik.ext.awt.image.spi.ErrorConstants, org.apache.batik.ext.awt.image.spi.RegistryEntry, org.apache.batik.ext.awt.image.spi.URLRegistryEntry

public class StreamJDKRegistryEntry
extends org.apache.batik.ext.awt.image.spi.AbstractRegistryEntry
implements org.apache.batik.ext.awt.image.spi.URLRegistryEntry

This Image tag registy entry is setup to wrap the core JDK Image stream tools.

Version:
$Id: StreamJDKRegistryEntry.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static float PRIORITY
          The priority of this entry.
 
Fields inherited from interface org.apache.batik.ext.awt.image.spi.ErrorConstants
ERR_STREAM_FORMAT_UNREADABLE, ERR_STREAM_UNREADABLE, ERR_URL_FORMAT_UNREADABLE, ERR_URL_UNINTERPRETABLE, ERR_URL_UNREACHABLE, RESOURCES
 
Constructor Summary
StreamJDKRegistryEntry()
           
 
Method Summary
 org.apache.batik.ext.awt.image.renderable.Filter handleURL(org.apache.batik.util.ParsedURL purl, boolean needRawData)
          Decode the URL into a RenderableImage
 boolean isCompatibleURL(org.apache.batik.util.ParsedURL purl)
          Check if the Stream references an image that can be handled by this format handler.
 RenderedImage loadImage(Image img)
           
 
Methods inherited from class org.apache.batik.ext.awt.image.spi.AbstractRegistryEntry
getFormatName, getMimeTypes, getPriority, getStandardExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.batik.ext.awt.image.spi.RegistryEntry
getFormatName, getMimeTypes, getPriority, getStandardExtensions
 

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

See Also:
Constant Field Values
Constructor Detail

StreamJDKRegistryEntry

public StreamJDKRegistryEntry()
Method Detail

isCompatibleURL

public boolean isCompatibleURL(org.apache.batik.util.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).

Specified by:
isCompatibleURL in interface org.apache.batik.ext.awt.image.spi.URLRegistryEntry

handleURL

public org.apache.batik.ext.awt.image.renderable.Filter handleURL(org.apache.batik.util.ParsedURL purl,
                                                                  boolean needRawData)
Decode the URL into a RenderableImage

Specified by:
handleURL in interface org.apache.batik.ext.awt.image.spi.URLRegistryEntry
Parameters:
purl - The URLto decode
needRawData - If true the image returned should not have any default color correction the file may specify applied.

loadImage

public RenderedImage loadImage(Image img)


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.