APIdia Launch Partner
Top Description Fields Constructors Methods
javax.imageio.spi

public final Class IIORegistry

extends ServiceRegistry
Class Inheritance
Imports
java.util.Iterator, .List, .ServiceLoader, .ServiceConfigurationError, com.sun.imageio.spi.FileImageInputStreamSpi, .FileImageOutputStreamSpi, .InputStreamImageInputStreamSpi, .OutputStreamImageOutputStreamSpi, .RAFImageInputStreamSpi, .RAFImageOutputStreamSpi, com.sun.imageio.plugins.gif.GIFImageReaderSpi, .GIFImageWriterSpi, com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi, .JPEGImageWriterSpi, com.sun.imageio.plugins.png.PNGImageReaderSpi, .PNGImageWriterSpi, com.sun.imageio.plugins.bmp.BMPImageReaderSpi, .BMPImageWriterSpi, com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi, .WBMPImageWriterSpi, com.sun.imageio.plugins.tiff.TIFFImageReaderSpi, .TIFFImageWriterSpi

A registry for Image I/O service provider instances. Service provider classes may be discovered at runtime by the mechanisms documented in ServiceLoader. The intent is that it be relatively inexpensive to load and inspect all available Image I/O service provider classes. These classes may then be used to locate and instantiate more heavyweight classes that will perform actual work, in this case instances of ImageReader, ImageWriter, ImageTranscoder, ImageInputStream, and ImageOutputStream. Service providers included in the Java runtime are automatically loaded as soon as this class is instantiated.

When the registerApplicationClasspathSpis method is called, additional service provider instances will be discovered using ServiceLoader.

It is also possible to manually add service providers not found automatically, as well as to remove those that are using the interfaces of the ServiceRegistry class. Thus the application may customize the contents of the registry as it sees fit.

For information on how to create and deploy service providers, refer to the documentation on ServiceLoader

Field Summary

Modifier and TypeField and Description
private static final List<Class<?>>
initialCategories

A List containing the valid IIO registry categories (superinterfaces) to be used in the constructor.

private static final IIORegistry

Constructor Summary

AccessConstructor and Description
private
IIORegistry()

Set up the valid service provider categories and automatically register all available service providers.

Method Summary

Modifier and TypeMethod and Description
public static IIORegistry

Returns:

the default registry for the Image I/O API
getDefaultInstance
()

Returns the default IIORegistry instance used by the Image I/O API.

public void
registerApplicationClasspathSpis()

Registers all available service providers found on the application class path, using the default ClassLoader.

private void
private void
Inherited from javax.imageio.spi.ServiceRegistry:
containsderegisterAllderegisterAllderegisterServiceProviderderegisterServiceProvidergetCategoriesgetServiceProviderByClassgetServiceProvidersgetServiceProviderslookupProviderslookupProvidersregisterServiceProviderregisterServiceProviderregisterServiceProviderssetOrderingunsetOrdering

Field Detail

initialCategoriesback to summary
private static final List<Class<?>> initialCategories

A List containing the valid IIO registry categories (superinterfaces) to be used in the constructor.

registryback to summary
private static final IIORegistry registry

Constructor Detail

IIORegistryback to summary
private IIORegistry()

Set up the valid service provider categories and automatically register all available service providers.

The constructor is private in order to prevent creation of additional instances.

Method Detail

getDefaultInstanceback to summary
public static IIORegistry getDefaultInstance()

Returns the default IIORegistry instance used by the Image I/O API. This instance should be used for all registry functions.

Returns:IIORegistry

the default registry for the Image I/O API

registerApplicationClasspathSpisback to summary
public void registerApplicationClasspathSpis()

Registers all available service providers found on the application class path, using the default ClassLoader. This method is typically invoked by the ImageIO.scanForPlugins method.

See Also
javax.imageio.ImageIO#scanForPlugins, ClassLoader#getResources
registerInstalledProvidersback to summary
private void registerInstalledProviders()
registerStandardSpisback to summary
private void registerStandardSpis()