Java ImageIO Usage lookupProviderByName( final ServiceRegistry registry, final String providerClassName)

Here you can find the source of lookupProviderByName( final ServiceRegistry registry, final String providerClassName)

Description

THIS METHOD WILL ME MOVED/RENAMED, DO NOT USE.

License

Open Source License

Parameter

Parameter Description
registry the registry to lookup from.
providerClassName name of the provider class.

Return

the provider instance, or null .

Declaration

public static <T> T lookupProviderByName(
        final ServiceRegistry registry, final String providerClassName) 

Method Source Code

//package com.java2s;

import javax.imageio.spi.ServiceRegistry;

public class Main {
    /**/*from   w ww. j  av a  2  s .c o  m*/
     * THIS METHOD WILL ME MOVED/RENAMED, DO NOT USE.
     *
     * @param registry the registry to lookup from.
     * @param providerClassName name of the provider class.
     *
     * @return the provider instance, or {@code null}.
     */
    public static <T> T lookupProviderByName(
            final ServiceRegistry registry, final String providerClassName) {
        try {
            return (T) registry.getServiceProviderByClass(Class
                    .forName(providerClassName));
        } catch (ClassNotFoundException ignore) {
            return null;
        }
    }
}

Related

  1. createAsciiField(int number, String name, String val)
  2. createImageWriteParam(ImageWriter writer, float quality)
  3. deregisterProvider( final ServiceRegistry registry, final IIOServiceProvider provider, final Class category)
  4. getParams(ImageWriter writer)
  5. guessCompressionRatio(final ImageReaderWriterSpi spi)
  6. setCompressionQuality(ImageWriteParam params, int quality)