equal
deleted
inserted
replaced
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; |