|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectIIOServiceProvider
ImageReaderWriterSpi
ImageReaderSpi
SpatialImageReader.Spi
ImageReaderAdapter.Spi
WorldFileImageReader.Spi
public static class WorldFileImageReader.Spi
Service provider interface (SPI) for WorldFileImageReaders. This provider wraps
an other provider (typically for the TIFF, JPEG or PNG formats), which shall be specified
at construction time. The legal input types are String,
File, URI and URL in order to allow the image
reader to infer the World File (".tfw") and Map Projection
(".prj") files from the image input file.
Plugins registration
At the difference of other ImageReader plugins, the WorldFileImageReader
plugin is not automatically registered in the JVM. This is because there is many plugins
to register (one instance of this Spi class for each format to wrap), and because
attempts to get an ImageReader to wrap while IIORegistry is scanning the
classpath for services cause an infinite loop. To enable the World File plugins,
users must invoke registerDefaults(ServiceRegistry) explicitly.
WorldFileImageWriter.Spi
| coverage/geotk-coverageio (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class ImageReaderAdapter.Spi |
|---|
main |
| Fields inherited from class ImageReaderSpi |
|---|
inputTypes, STANDARD_INPUT_TYPE, writerSpiNames |
| Fields inherited from class IIOServiceProvider |
|---|
vendorName, version |
| Constructor Summary | |
|---|---|
WorldFileImageReader.Spi(ImageReaderSpi main)
Creates a provider which will use the given format for reading pixel values. |
|
WorldFileImageReader.Spi(String format)
Creates a provider which will use the given format for reading pixel values. |
|
| Method Summary | |
|---|---|
boolean |
canDecodeInput(Object source)
Returns true if the supplied source object appears to be of the format supported
by this reader. |
ImageReader |
createReaderInstance(Object extension)
Creates a new World File reader. |
String |
getDescription(Locale locale)
Returns a brief, human-readable description of this service provider. |
Set<InformationType> |
getModifiedInformation(Object source)
Returns the kind of information that this wrapper will add or modify compared to the ImageReaderAdapter.main reader. |
static void |
registerDefaults(ServiceRegistry registry)
Registers a default set of World File formats. |
static void |
unregisterDefaults(ServiceRegistry registry)
Unregisters the providers registered by registerDefaults(ServiceRegistry). |
| Methods inherited from class ImageReaderAdapter.Spi |
|---|
getImageMetadataFormat, getStreamMetadataFormat, onRegistration, unwrap |
| Methods inherited from class ImageReaderSpi |
|---|
createReaderInstance, getImageWriterSpiNames, getInputTypes, isOwnReader |
| Methods inherited from class IIOServiceProvider |
|---|
getVendorName, getVersion, onDeregistration |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorldFileImageReader.Spi(ImageReaderSpi main)
main - The provider of the readers to use for reading the pixel values.
public WorldFileImageReader.Spi(String format)
throws IllegalArgumentException
format - The name of the provider to use for reading the pixel values.
IllegalArgumentException - If no provider is found for the given format.| Method Detail |
|---|
public String getDescription(Locale locale)
getDescription in class IIOServiceProviderlocale - The locale for which the return value should be localized.
public boolean canDecodeInput(Object source)
throws IOException
true if the supplied source object appears to be of the format supported
by this reader. The default implementation checks if at least one of the ".tfw
(actual extension may vary) or ".prj" file is presents, then delegates to the
super-class method.
canDecodeInput in class ImageReaderAdapter.Spisource - The input (typically a File) to be decoded.
true if it is likely that the file can be decoded.
IOException - If an error occurred while reading the file.
public Set<InformationType> getModifiedInformation(Object source)
throws IOException
getModifiedInformation in class ImageReaderAdapter.Spisource - The input (typically a File) to be decoded.
IOException - If an error occurred while reading the file.
public ImageReader createReaderInstance(Object extension)
throws IOException
extension argument
is forwarded to the main provider with no change.
createReaderInstance in class ImageReaderSpiextension - A plug-in specific extension object, or null.
IOException - If the reader can not be created.@Configuration public static void registerDefaults(ServiceRegistry registry)
The current implementation registers plugins for the TIFF, JPEG, PNG, GIF, BMP,
matrix and ASCII-Grid (".prj" file only) formats, but this list can be
augmented in any future Geotk version.
registry - The registry where to register the formats, or null for
the default registry.Registry.setDefaultCodecPreferences(),
Setup@Configuration public static void unregisterDefaults(ServiceRegistry registry)
registerDefaults(ServiceRegistry).
registry - The registry from which to unregister the formats, or null
for the default registry.Setup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||