org.geotoolkit.image.io
Class StreamImageWriter.Spi

Object
  extended by IIOServiceProvider
      extended by ImageReaderWriterSpi
          extended by ImageWriterSpi
              extended by SpatialImageWriter.Spi
                  extended by StreamImageWriter.Spi
All Implemented Interfaces:
RegisterableService
Direct Known Subclasses:
TextImageWriter.Spi
Enclosing class:
StreamImageWriter

protected abstract static class StreamImageWriter.Spi
extends SpatialImageWriter.Spi

Service provider interface (SPI) for StreamImageWriters. The constructor of this class initializes the ImageWriterSpi.outputTypes field to the value documented in the StreamImageWriter javadoc, which are:

Field Value
 ImageWriterSpi.outputTypes   String, File, URI, URL, URLConnection, OutputStream, ImageOutputStream, WritableByteChannel 
See super-class javadoc for remaining fields

It is up to subclass constructors to initialize all other instance variables in order to provide working versions of every methods.

Since:
2.4
Version:
3.20
Author:
Martin Desruisseaux (IRD)
See Also:
StreamImageReader.Spi
Module:
coverage/geotk-coverageio (download)    View source code for this class

Field Summary
 
Fields inherited from class ImageWriterSpi
outputTypes, readerSpiNames, STANDARD_OUTPUT_TYPE
 
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
protected StreamImageWriter.Spi()
          Constructs a quasi-blank StreamImageWriter.Spi.
 
Method Summary
 boolean canEncodeImage(ImageTypeSpecifier type)
          Returns true if the image writer implementation associated with this service provider is able to encode an image with the given layout.
 
Methods inherited from class SpatialImageWriter.Spi
getImageMetadataFormat, getStreamMetadataFormat
 
Methods inherited from class ImageWriterSpi
canEncodeImage, createWriterInstance, createWriterInstance, getImageReaderSpiNames, getOutputTypes, isFormatLossless, isOwnWriter
 
Methods inherited from class ImageReaderWriterSpi
getExtraImageMetadataFormatNames, getExtraStreamMetadataFormatNames, getFileSuffixes, getFormatNames, getMIMETypes, getNativeImageMetadataFormatName, getNativeStreamMetadataFormatName, getPluginClassName, isStandardImageMetadataFormatSupported, isStandardStreamMetadataFormatSupported
 
Methods inherited from class IIOServiceProvider
getDescription, getVendorName, getVersion, onDeregistration, onRegistration
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamImageWriter.Spi

protected StreamImageWriter.Spi()
Constructs a quasi-blank StreamImageWriter.Spi. The ImageWriterSpi.outputTypes field is initialized as documented in the class javadoc. It is up to the subclass to initialize all other instance variables in order to provide working versions of all methods.

For efficiency reasons, the above fields are initialized to shared arrays. Subclasses can assign new arrays, but should not modify the default array content.

Method Detail

canEncodeImage

public boolean canEncodeImage(ImageTypeSpecifier type)
Returns true if the image writer implementation associated with this service provider is able to encode an image with the given layout. The default implementation returns always true, which is accurate if the writer will fetch pixel values with the help of an iterator.

Specified by:
canEncodeImage in class ImageWriterSpi


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