public final class IIORegistry extends ServiceRegistry
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
ServiceRegistry.Filter
Modifier and Type | Method | Description |
---|---|---|
static IIORegistry |
getDefaultInstance() |
Returns the default IIORegistry instance used by the Image I/O API. |
void |
registerApplicationClasspathSpis() |
Registers all available service providers found on the application class path, using the default ClassLoader . |
contains, deregisterAll, deregisterAll, deregisterServiceProvider, deregisterServiceProvider, finalize, getCategories, getServiceProviderByClass, getServiceProviders, getServiceProviders, lookupProviders, lookupProviders, registerServiceProvider, registerServiceProvider, registerServiceProviders, setOrdering, unsetOrdering
public static IIORegistry getDefaultInstance()
IIORegistry
instance used by the Image I/O API. This instance should be used for all registry functions. Each ThreadGroup
will receive its own instance; this allows different Applet
s in the same browser (for example) to each have their own registry.
ThreadGroup
.public void registerApplicationClasspathSpis()
ClassLoader
. This method is typically invoked by the ImageIO.scanForPlugins
method.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/imageio/spi/IIORegistry.html