Example usage for javax.imageio.spi ImageReaderSpi getDescription

List of usage examples for javax.imageio.spi ImageReaderSpi getDescription

Introduction

In this page you can find the example usage for javax.imageio.spi ImageReaderSpi getDescription.

Prototype

public abstract String getDescription(Locale locale);

Source Link

Document

Returns a brief, human-readable description of this service provider and its associated implementation.

Usage

From source file:pl.edu.icm.visnow.system.main.VisNow.java

private static void startupInfo() {
    LOGGER.info("");
    LOGGER.info("");
    LOGGER.info("-------- VisNow startup info --------");

    if (debug) {//w w  w  .j  a  v  a2  s .  c  o m
        RuntimeMXBean RuntimemxBean = ManagementFactory.getRuntimeMXBean();
        List<String> aList = RuntimemxBean.getInputArguments();
        LOGGER.info(" * JVM startup flags:");
        for (int i = 0; i < aList.size(); i++) {
            LOGGER.info("    " + aList.get(i));
        }
        LOGGER.info("");
        Set<String> p = System.getProperties().stringPropertyNames();
        Iterator<String> ip = p.iterator();
        LOGGER.info(" * System properties:");
        String key;
        while (ip.hasNext()) {
            key = ip.next();
            LOGGER.info("    " + key + " = " + System.getProperty(key));
        }
        LOGGER.info("");

        Map<String, String> env = System.getenv();
        Set<String> envKeys = env.keySet();
        Iterator<String> envKeysI = envKeys.iterator();

        LOGGER.info(" * Environment variables:");
        while (envKeysI.hasNext()) {
            key = envKeysI.next();
            LOGGER.info("    " + key + " = " + env.get(key));
        }
        LOGGER.info("  ");
        LOGGER.info("------ Java Advanced Imaging info -------");
        String[] formats = ImageIO.getReaderFormatNames();
        String readerDescription, readerVendorName, readerVersion;
        ImageReader reader;
        ImageReaderSpi spi;
        for (int i = 0; i < formats.length; i++) {
            Iterator<ImageReader> tmpReaders = ImageIO.getImageReadersByFormatName(formats[i]);
            while (tmpReaders.hasNext()) {
                reader = tmpReaders.next();
                spi = reader.getOriginatingProvider();
                readerDescription = spi.getDescription(Locale.US);
                readerVendorName = spi.getVendorName();
                readerVersion = spi.getVersion();
                LOGGER.info("    " + formats[i] + ": " + readerDescription + " " + readerVendorName + " "
                        + readerVersion);
            }
        }
        LOGGER.info("-----------------------------------------");

    } else {

        LOGGER.info(" * System properties:");
        LOGGER.info("    java.runtime.name = " + System.getProperty("java.runtime.name"));
        LOGGER.info("    java.vm.version = " + System.getProperty("java.vm.version"));
        LOGGER.info("    java.vm.vendor = " + System.getProperty("java.vm.vendor"));
        LOGGER.info("    java.vm.name = " + System.getProperty("java.vm.name"));
        LOGGER.info("    java.specification.version = " + System.getProperty("java.specification.version"));
        LOGGER.info("    java.runtime.version = " + System.getProperty("java.runtime.version"));
        LOGGER.info("    os.arch = " + System.getProperty("os.arch"));
        LOGGER.info("    os.name = " + System.getProperty("os.name"));
        LOGGER.info("    os.version = " + System.getProperty("os.version"));
        LOGGER.info("    java.library.path = " + System.getProperty("java.library.path"));
        LOGGER.info("    java.class.path = " + System.getProperty("java.class.path"));
        LOGGER.info("    java.ext.dirs = " + System.getProperty("java.ext.dirs"));
        LOGGER.info("");
        LOGGER.info(" * Environment variables:");
        LOGGER.info("    JAVA_HOME = " + System.getenv("JAVA_HOME"));
        LOGGER.info("    PATH = " + System.getenv("PATH"));
        LOGGER.info("    LD_LIBRARY_PATH = " + System.getenv("LD_LIBRARY_PATH"));
        LOGGER.info("    CLASSPATH = " + System.getenv("CLASSPATH"));
        LOGGER.info("-------------------------------------");

    }
    LOGGER.info("");
    LOGGER.info("");

}