xmlgraphics-commons 1.3

org.apache.xmlgraphics.image.loader.impl
Class AbstractImageLoader

java.lang.Object
  extended by org.apache.xmlgraphics.image.loader.impl.AbstractImageLoader
All Implemented Interfaces:
ImageLoader
Direct Known Subclasses:
CompositeImageLoader, ImageLoaderEPS, ImageLoaderImageIO, ImageLoaderRaw, ImageLoaderRawCCITTFax, ImageLoaderRawJPEG

public abstract class AbstractImageLoader
extends java.lang.Object
implements ImageLoader

Simple abstract base class for ImageLoaders.


Constructor Summary
AbstractImageLoader()
           
 
Method Summary
 int getUsagePenalty()
          Returns the penalty assigned to using this image loader.
 Image loadImage(ImageInfo info, ImageSessionContext session)
          Loads and returns an image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xmlgraphics.image.loader.spi.ImageLoader
getTargetFlavor, loadImage
 

Constructor Detail

AbstractImageLoader

public AbstractImageLoader()
Method Detail

loadImage

public Image loadImage(ImageInfo info,
                       ImageSessionContext session)
                throws ImageException,
                       java.io.IOException
Loads and returns an image.

Specified by:
loadImage in interface ImageLoader
Parameters:
info - the image info object indicating the image
session - the session context
Returns:
the fully loaded image
Throws:
ImageException - if an error occurs while loading the image
java.io.IOException - if an I/O error occurs while loading the image

getUsagePenalty

public int getUsagePenalty()
Returns the penalty assigned to using this image loader. The value is used to select the best processing chain for images.

Specified by:
getUsagePenalty in interface ImageLoader
Returns:
the usage penalty (must be a non-negative integer)

xmlgraphics-commons 1.3

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