JavaTM 2 Platform
Standard Ed. 5.0

javax.imageio.spi
Class ImageWriterSpi

java.lang.Object
  extended by javax.imageio.spi.IIOServiceProvider
      extended by javax.imageio.spi.ImageReaderWriterSpi
          extended by javax.imageio.spi.ImageWriterSpi
All Implemented Interfaces:
RegisterableService

public abstract class ImageWriterSpi
extends ImageReaderWriterSpi

The service provider interface (SPI) for ImageWriters. For more information on service provider classes, see the class comment for the IIORegistry class.

Each ImageWriterSpi provides several types of information about the ImageWriter class with which it is associated.

The name of the vendor who defined the SPI class and a brief description of the class are available via the getVendorName, getDescription, and getVersion methods. These methods may be internationalized to provide locale-specific output. These methods are intended mainly to provide short, human-writable information that might be used to organize a pop-up menu or other list.

Lists of format names, file suffixes, and MIME types associated with the service may be obtained by means of the getFormatNames, getFileSuffixes, and getMIMEType methods. These methods may be used to identify candidate ImageWriters for writing a particular file or stream based on manual format selection, file naming, or MIME associations.

A more reliable way to determine which ImageWriters are likely to be able to parse a particular data stream is provided by the canEncodeImage method. This methods allows the service provider to inspect the actual image contents.

Finally, an instance of the ImageWriter class associated with this service provider may be obtained by calling the createWriterInstance method. Any heavyweight initialization, such as the loading of native libraries or creation of large tables, should be deferred at least until the first invocation of this method.

See Also:
IIORegistry, ImageTypeSpecifier, ImageWriter

Field Summary
protected  Class[] outputTypes
          An array of Class objects to be returned from getOutputTypes, initially null.
protected  String[] readerSpiNames
          An array of strings to be returned from getImageReaderSpiNames, initially null.
static Class[] STANDARD_OUTPUT_TYPE
          A single-element array, initially containing ImageInputStream.class, to be returned from getInputTypes.
 
Fields inherited from class javax.imageio.spi.ImageReaderWriterSpi
extraImageMetadataFormatClassNames, extraImageMetadataFormatNames, extraStreamMetadataFormatClassNames, extraStreamMetadataFormatNames, MIMETypes, names, nativeImageMetadataFormatClassName, nativeImageMetadataFormatName, nativeStreamMetadataFormatClassName, nativeStreamMetadataFormatName, pluginClassName, suffixes, supportsStandardImageMetadataFormat, supportsStandardStreamMetadataFormat
 
Fields inherited from class javax.imageio.spi.IIOServiceProvider
vendorName, version
 
Constructor Summary
protected ImageWriterSpi()
          Constructs a blank ImageWriterSpi.