Scans for plug-ins on the application class path,
loads their service provider classes, and registers a service
provider instance for each one found with the
IIORegistry
.
Scans for plug-ins on the application class path,
loads their service provider classes, and registers a service
provider instance for each one found with the
IIORegistry
.
This method is needed because the application class path can
theoretically change, or additional plug-ins may become available.
Rather than re-scanning the classpath on every invocation of the
API, the class path is scanned automatically only on the first
invocation. Clients can call this method to prompt a re-scan.
Thus this method need only be invoked by sophisticated applications
which dynamically make new plug-ins available at runtime.
The getResources
method of the context
ClassLoader
is used locate JAR files containing
files named
META-INF/services/javax.imageio.spi.
classname,
where classname is one of ImageReaderSpi
,
ImageWriterSpi
, ImageTranscoderSpi
,
ImageInputStreamSpi
, or
ImageOutputStreamSpi
, along the application class
path.
The contents of the located files indicate the names of
actual implementation classes which implement the
aforementioned service provider interfaces; the default class
loader is then used to load each of these classes and to
instantiate an instance of each class, which is then placed
into the registry for later retrieval.
The exact set of locations searched depends on the
implementation of the Java runtime enviroment.
See Also:
ClassLoader.getResources(java.lang.String)
,