- java.lang.Object
-
- javax.imageio.spi.ServiceRegistry
-
- javax.imageio.spi.IIORegistry
-
public final class IIORegistry extends ServiceRegistry
A registry for Image I/O service provider instances. Service provider classes may be discovered at runtime by the mechanisms documented inServiceLoader. 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 ofImageReader,ImageWriter,ImageTranscoder,ImageInputStream, andImageOutputStream. Service providers included in the Java runtime are automatically loaded as soon as this class is instantiated.When the
registerApplicationClasspathSpismethod is called, additional service provider instances will be discovered usingServiceLoader.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
ServiceRegistryclass. 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
-
-
Nested Class Summary
-
Nested classes/interfaces declared in class javax.imageio.spi.ServiceRegistry
ServiceRegistry.Filter
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IIORegistrygetDefaultInstance()Returns the defaultIIORegistryinstance used by the Image I/O API.voidregisterApplicationClasspathSpis()Registers all available service providers found on the application class path, using the defaultClassLoader.-
Methods declared in class javax.imageio.spi.ServiceRegistry
contains, deregisterAll, deregisterAll, deregisterServiceProvider, deregisterServiceProvider, finalize, getCategories, getServiceProviderByClass, getServiceProviders, getServiceProviders, lookupProviders, lookupProviders, registerServiceProvider, registerServiceProvider, registerServiceProviders, setOrdering, unsetOrdering
-
-
-
-
Method Detail
-
getDefaultInstance
public static IIORegistry getDefaultInstance()
Returns the defaultIIORegistryinstance used by the Image I/O API. This instance should be used for all registry functions.Each
ThreadGroupwill receive its own instance; this allows differentApplets in the same browser (for example) to each have their own registry.- Returns:
- the default registry for the current
ThreadGroup.
-
registerApplicationClasspathSpis
public void registerApplicationClasspathSpis()
Registers all available service providers found on the application class path, using the defaultClassLoader. This method is typically invoked by theImageIO.scanForPluginsmethod.
-
-