src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java

Print this page
rev 9343 : 8033716: Fix raw and unchecked lint warnings in com.sun.imageio
Reviewed-by: darcy, prr, bae


  34 import javax.imageio.ImageReader;
  35 import javax.imageio.IIOException;
  36 
  37 public class BMPImageReaderSpi extends ImageReaderSpi {
  38 
  39     private static String [] writerSpiNames =
  40         {"com.sun.imageio.plugins.bmp.BMPImageWriterSpi"};
  41     private static String[] formatNames = {"bmp", "BMP"};
  42     private static String[] entensions = {"bmp"};
  43     private static String[] mimeType = {"image/bmp"};
  44 
  45     private boolean registered = false;
  46 
  47     public BMPImageReaderSpi() {
  48         super("Oracle Corporation",
  49               "1.0",
  50               formatNames,
  51               entensions,
  52               mimeType,
  53               "com.sun.imageio.plugins.bmp.BMPImageReader",
  54               new Class[] { ImageInputStream.class },
  55               writerSpiNames,
  56               false,
  57               null, null, null, null,
  58               true,
  59               BMPMetadata.nativeMetadataFormatName,
  60               "com.sun.imageio.plugins.bmp.BMPMetadataFormat",
  61               null, null);
  62     }
  63 
  64     public void onRegistration(ServiceRegistry registry,
  65                                Class<?> category) {
  66         if (registered) {
  67             return;
  68         }
  69         registered = true;
  70     }
  71 
  72     public String getDescription(Locale locale) {
  73         return "Standard BMP Image Reader";
  74     }


  34 import javax.imageio.ImageReader;
  35 import javax.imageio.IIOException;
  36 
  37 public class BMPImageReaderSpi extends ImageReaderSpi {
  38 
  39     private static String [] writerSpiNames =
  40         {"com.sun.imageio.plugins.bmp.BMPImageWriterSpi"};
  41     private static String[] formatNames = {"bmp", "BMP"};
  42     private static String[] entensions = {"bmp"};
  43     private static String[] mimeType = {"image/bmp"};
  44 
  45     private boolean registered = false;
  46 
  47     public BMPImageReaderSpi() {
  48         super("Oracle Corporation",
  49               "1.0",
  50               formatNames,
  51               entensions,
  52               mimeType,
  53               "com.sun.imageio.plugins.bmp.BMPImageReader",
  54               new Class<?>[] { ImageInputStream.class },
  55               writerSpiNames,
  56               false,
  57               null, null, null, null,
  58               true,
  59               BMPMetadata.nativeMetadataFormatName,
  60               "com.sun.imageio.plugins.bmp.BMPMetadataFormat",
  61               null, null);
  62     }
  63 
  64     public void onRegistration(ServiceRegistry registry,
  65                                Class<?> category) {
  66         if (registered) {
  67             return;
  68         }
  69         registered = true;
  70     }
  71 
  72     public String getDescription(Locale locale) {
  73         return "Standard BMP Image Reader";
  74     }