org.geotoolkit.image.io.plugin
Class NetcdfImageReader.Spi
Object
IIOServiceProvider
ImageReaderWriterSpi
ImageReaderSpi
SpatialImageReader.Spi
StreamImageReader.Spi
NetcdfImageReader.Spi
- All Implemented Interfaces:
- RegisterableService
- Enclosing class:
- NetcdfImageReader
public static class NetcdfImageReader.Spi
- extends StreamImageReader.Spi
The service provider for NetcdfImageReader. This SPI provides
necessary implementation for creating default NetcdfImageReader.
The default constructor initializes the fields to the values listed below.
Users wanting different values should create a subclass of Spi and
set the desired values in their constructor.
- Since:
- 3.08 (derived from 2.4)
- Version:
- 3.15
- Author:
- Martin Desruisseaux (Geomatys), Antoine Hnawia (IRD)
- Module:
| Fields inherited from class ImageReaderWriterSpi |
extraImageMetadataFormatClassNames, extraImageMetadataFormatNames, extraStreamMetadataFormatClassNames, extraStreamMetadataFormatNames, MIMETypes, names, nativeImageMetadataFormatClassName, nativeImageMetadataFormatName, nativeStreamMetadataFormatClassName, nativeStreamMetadataFormatName, pluginClassName, suffixes, supportsStandardImageMetadataFormat, supportsStandardStreamMetadataFormat |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetcdfImageReader.Spi
public NetcdfImageReader.Spi()
- Constructs a default
NetcdfImageReader.Spi. The fields are initialized as
documented in the class javadoc. Subclasses can
modify those values if desired.
For efficiency reasons, the fields are initialized to shared arrays.
Subclasses can assign new arrays, but should not modify the default array content.
getDescription
public String getDescription(Locale locale)
- Returns a description for this provider.
- Specified by:
getDescription in class IIOServiceProvider
- TODO:
- Localize
canDecodeInput
public boolean canDecodeInput(Object source)
throws IOException
- Checks if the specified input seems to be a readable NetCDF file. If the given
input is a stream like
ImageInputStream, then this
method conservatively returns false because testing this stream would
require copying it to a temporary file.
- Specified by:
canDecodeInput in class ImageReaderSpi
- Parameters:
source - the object (typically a File) to be decoded.
- Returns:
true if it is likely that the given source can be decoded.
- Throws:
IOException - If an error occurred while opening the file.
createReaderInstance
public ImageReader createReaderInstance(Object extension)
throws IOException
- Returns an instance of the
NetcdfImageReader implementation associated
with this service provider.
- Specified by:
createReaderInstance in class ImageReaderSpi
- Parameters:
extension - An optional extension object, which may be null.
- Returns:
- An image reader instance.
- Throws:
IOException - if the attempt to instantiate the reader fails.
Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.