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
| Modifier and Type | Field and Description |
|---|---|
| private static final List | initialCategories
A |
| private static final IIORegistry |
| Access | Constructor and Description |
|---|---|
| private | IIORegistry()
Set up the valid service provider categories and automatically register all available service providers. |
| Modifier and Type | Method and Description |
|---|---|
| public static IIORegistry | Returns: the default registry for the Image I/O APIReturns the default |
| public void | registerApplicationClasspathSpis()
Registers all available service providers found on the
application class path, using the default
|
| private void | |
| private void |
| initialCategories | back to summary |
|---|---|
| private static final List<Class<?>> initialCategories A | |
| registry | back to summary |
|---|---|
| private static final IIORegistry registry | |
| IIORegistry | back 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. | |
| getDefaultInstance | back to summary |
|---|---|
| public static IIORegistry getDefaultInstance() Returns the default
| |
| registerApplicationClasspathSpis | back to summary |
|---|---|
| public void registerApplicationClasspathSpis() Registers all available service providers found on the
application class path, using the default
| |
| registerInstalledProviders | back to summary |
|---|---|
| private void registerInstalledProviders() | |
| registerStandardSpis | back to summary |
|---|---|
| private void registerStandardSpis() | |