org.geotoolkit.image.io.mosaic
Class MosaicImageReader.Spi

Object
  extended by IIOServiceProvider
      extended by ImageReaderWriterSpi
          extended by ImageReaderSpi
              extended by MosaicImageReader.Spi
All Implemented Interfaces:
RegisterableService
Enclosing class:
MosaicImageReader

public static class MosaicImageReader.Spi
extends ImageReaderSpi

Service provider for MosaicImageReader. This service provider is not strictly compliant with the Image I/O specification since it cant not work with ImageInputStream.

Since:
2.5
Version:
3.18
Author:
Martin Desruisseaux (Geomatys)
Module:
coverage/geotk-coverageio (download)    View source code for this class

Field Summary
static MosaicImageReader.Spi DEFAULT
          The default instance.
 
Fields inherited from class ImageReaderSpi
inputTypes, STANDARD_INPUT_TYPE, writerSpiNames
 
Fields inherited from class ImageReaderWriterSpi
extraImageMetadataFormatClassNames, extraImageMetadataFormatNames, extraStreamMetadataFormatClassNames, extraStreamMetadataFormatNames, MIMETypes, names, nativeImageMetadataFormatClassName, nativeImageMetadataFormatName, nativeStreamMetadataFormatClassName, nativeStreamMetadataFormatName, pluginClassName, suffixes, supportsStandardImageMetadataFormat, supportsStandardStreamMetadataFormat
 
Fields inherited from class IIOServiceProvider
vendorName, version
 
Constructor Summary
MosaicImageReader.Spi()
          Creates a default provider.
 
Method Summary
 boolean canDecodeInput(Object source)
          Returns true if the image reader can decode the given input.
 ImageReader createReaderInstance(Object extension)
          Returns a new MosaicImageReader.
 String getDescription(Locale locale)
          Returns a brief, human-readable description of this service provider.
 Class<?>[] getInputTypes()
          Returns the types of objects that may be used as arguments to the ImageReader.setInput(Object) method.
 
Methods inherited from class ImageReaderSpi
createReaderInstance, getImageWriterSpiNames, isOwnReader
 
Methods inherited from class ImageReaderWriterSpi
getExtraImageMetadataFormatNames, getExtraStreamMetadataFormatNames, getFileSuffixes, getFormatNames, getImageMetadataFormat, getMIMETypes, getNativeImageMetadataFormatName, getNativeStreamMetadataFormatName, getPluginClassName, getStreamMetadataFormat, isStandardImageMetadataFormatSupported, isStandardStreamMetadataFormatSupported
 
Methods inherited from class IIOServiceProvider
getVendorName, getVersion, onDeregistration, onRegistration
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final MosaicImageReader.Spi DEFAULT
The default instance. There is no instance of this provider registered in the standard IIORegistry, because this provider is not strictly compliant with the Image I/O requirement (in particular, the Mosaic Image Reader does not accept ImageInputStream). This constant can be used as a replacement.

Constructor Detail

MosaicImageReader.Spi

public MosaicImageReader.Spi()
Creates a default provider. This constructor does not set the ImageReaderSpi.inputTypes field in order to delay loading of Tile and TileManager classes as much as possible.

Method Detail

getInputTypes

public Class<?>[] getInputTypes()
Returns the types of objects that may be used as arguments to the ImageReader.setInput(Object) method. This method initializes the ImageReaderSpi.inputTypes field when first needed.

The types that MosaicImageReader can accept are the types that TileManagerFactory.createFromObject(Object) can process.

Overrides:
getInputTypes in class ImageReaderSpi
Since:
3.18

canDecodeInput

public boolean canDecodeInput(Object source)
                       throws IOException
Returns true if the image reader can decode the given input. The default implementation returns true if the given object is an instance assignable to one of the types returned by the getInputTypes() implementation of this Spi class, and other type-specific restrictions are meet (e.g. Collection contains only instances of Tile, etc.).

Specified by:
canDecodeInput in class ImageReaderSpi
Throws:
IOException - If an I/O operation was required and failed.

createReaderInstance

public ImageReader createReaderInstance(Object extension)
                                 throws IOException
Returns a new MosaicImageReader.

Specified by:
createReaderInstance in class ImageReaderSpi
Throws:
IOException - If an I/O operation was required and failed.

getDescription

public String getDescription(Locale locale)
Returns a brief, human-readable description of this service provider.

Specified by:
getDescription in class IIOServiceProvider
TODO:
Localize.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.