src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java

Print this page
rev 9230 : imported patch 8033716


  43     private static final String[] names = { "png", "PNG" };
  44 
  45     private static final String[] suffixes = { "png" };
  46 
  47     private static final String[] MIMETypes = { "image/png", "image/x-png" };
  48 
  49     private static final String readerClassName =
  50         "com.sun.imageio.plugins.png.PNGImageReader";
  51 
  52     private static final String[] writerSpiNames = {
  53         "com.sun.imageio.plugins.png.PNGImageWriterSpi"
  54     };
  55 
  56     public PNGImageReaderSpi() {
  57         super(vendorName,
  58               version,
  59               names,
  60               suffixes,
  61               MIMETypes,
  62               readerClassName,
  63               new Class[] { ImageInputStream.class },
  64               writerSpiNames,
  65               false,
  66               null, null,
  67               null, null,
  68               true,
  69               PNGMetadata.nativeMetadataFormatName,
  70               "com.sun.imageio.plugins.png.PNGMetadataFormat",
  71               null, null
  72               );
  73     }
  74 
  75     public String getDescription(Locale locale) {
  76         return "Standard PNG image reader";
  77     }
  78 
  79     public boolean canDecodeInput(Object input) throws IOException {
  80         if (!(input instanceof ImageInputStream)) {
  81             return false;
  82         }
  83 


  43     private static final String[] names = { "png", "PNG" };
  44 
  45     private static final String[] suffixes = { "png" };
  46 
  47     private static final String[] MIMETypes = { "image/png", "image/x-png" };
  48 
  49     private static final String readerClassName =
  50         "com.sun.imageio.plugins.png.PNGImageReader";
  51 
  52     private static final String[] writerSpiNames = {
  53         "com.sun.imageio.plugins.png.PNGImageWriterSpi"
  54     };
  55 
  56     public PNGImageReaderSpi() {
  57         super(vendorName,
  58               version,
  59               names,
  60               suffixes,
  61               MIMETypes,
  62               readerClassName,
  63               new Class<?>[] { ImageInputStream.class },
  64               writerSpiNames,
  65               false,
  66               null, null,
  67               null, null,
  68               true,
  69               PNGMetadata.nativeMetadataFormatName,
  70               "com.sun.imageio.plugins.png.PNGMetadataFormat",
  71               null, null
  72               );
  73     }
  74 
  75     public String getDescription(Locale locale) {
  76         return "Standard PNG image reader";
  77     }
  78 
  79     public boolean canDecodeInput(Object input) throws IOException {
  80         if (!(input instanceof ImageInputStream)) {
  81             return false;
  82         }
  83