src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputImageTests.java
changeset 54871 c2e4aef5edf2
parent 47216 71c04702a3d5
equal deleted inserted replaced
54870:0d49e7c0b4fa 54871:c2e4aef5edf2
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
     3  *
     3  *
     4  * Redistribution and use in source and binary forms, with or without
     4  * Redistribution and use in source and binary forms, with or without
     5  * modification, are permitted provided that the following conditions
     5  * modification, are permitted provided that the following conditions
     6  * are met:
     6  * are met:
     7  *
     7  *
   182             // IIO Tools package, so we should support that somehow
   182             // IIO Tools package, so we should support that somehow
   183             ImageReaderSpi spi = (ImageReaderSpi)readerspis.next();
   183             ImageReaderSpi spi = (ImageReaderSpi)readerspis.next();
   184             String klass = spi.getClass().getName();
   184             String klass = spi.getClass().getName();
   185             String format = spi.getFormatNames()[0].toLowerCase();
   185             String format = spi.getFormatNames()[0].toLowerCase();
   186             String suffix = spi.getFileSuffixes()[0].toLowerCase();
   186             String suffix = spi.getFileSuffixes()[0].toLowerCase();
   187             if (suffix == null || suffix.equals("")) {
   187             if (suffix == null || suffix.isEmpty()) {
   188                 suffix = format;
   188                 suffix = format;
   189             }
   189             }
   190             String shortName;
   190             String shortName;
   191             if (klass.startsWith("com.sun.imageio.plugins")) {
   191             if (klass.startsWith("com.sun.imageio.plugins")) {
   192                 shortName = "core-" + suffix;
   192                 shortName = "core-" + suffix;