Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.0.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.image.loader.impl
Class AbstractImageLoaderFactory

    java.lang.Object
      org.apache.xmlgraphics.image.loader.impl.AbstractImageLoaderFactory

All Implemented Interfaces:
  ImageLoaderFactory

Direct Known Subclasses:
  ImageLoaderFactoryEPS, ImageLoaderFactoryImageIO, ImageLoaderFactoryInternalTIFF, ImageLoaderFactoryPNG, ImageLoaderFactoryRaw, ImageLoaderFactoryRawCCITTFax

    public abstract class AbstractImageLoaderFactory

extends Object
implements ImageLoaderFactory

Abstract base class for ImageLoaderFactory implementations.

Constructor Summary
`AbstractImageLoaderFactory()`

Method Summary
`int` | `getUsagePenalty(String mime, ImageFlavor flavor)` Deprecated. Redundancy with `ImageLoader.getUsagePenalty()`
`boolean` | `isSupported(ImageInfo imageInfo)` Indicates whether the given image (represented by an `ImageInfo` object) is supported by the loader.

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.ImageLoaderFactory
`getSupportedFlavors, getSupportedMIMETypes, isAvailable, newImageLoader`

Constructor Detail

### AbstractImageLoaderFactory

    public AbstractImageLoaderFactory()

Method Detail

### isSupported

    public boolean isSupported(ImageInfo imageInfo)

  Indicates whether the given image (represented by an `ImageInfo` object) is supported by the loader. By default, implementations return true assuming all images of the supported MIME types can be processed correctly. In some cases, however, an ImageLoader may only support a subset of a format because it offers an optimized way to embed the image in the target format (for example: CCITT compressed TIFF files in PDF and PostScript). For this to work, the preloader must register some information in the ImageInfo's custom objects so the factory can identify if an image may or may not be supported.

  Specified by:
    `isSupported` in interface `ImageLoaderFactory`
  Parameters:
    `imageInfo` - the image info object
  Returns:
    true if the image is supported by the loaders generated by this factory

### getUsagePenalty

    public int getUsagePenalty(String mime,
                               ImageFlavor flavor)

  Deprecated. Redundancy with `ImageLoader.getUsagePenalty()`

  Returns the usage penalty for a particular ImageLoader. This is used to select the best ImageLoader implementation for loading an image.

  Specified by:
    `getUsagePenalty` in interface `ImageLoaderFactory`
  Parameters:
    `mime` - the MIME type
    `flavor` - the target image flavor
  Returns:
    the usage penalty (must be a non-negative integer)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.0.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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