< prev index next >

src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java

Print this page

        

@@ -176,10 +176,11 @@
     public BMPImageReader(ImageReaderSpi originator) {
         super(originator);
     }
 
     /** Overrides the method defined in the superclass. */
+    @Override
     public void setInput(Object input,
                          boolean seekForwardOnly,
                          boolean ignoreMetadata) {
         super.setInput(input, seekForwardOnly, ignoreMetadata);
         iis = (ImageInputStream) input; // Always works

@@ -187,10 +188,11 @@
             iis.setByteOrder(ByteOrder.LITTLE_ENDIAN);
         resetHeaderInfo();
     }
 
     /** Overrides the method defined in the superclass. */
+    @Override
     public int getNumImages(boolean allowSearch) throws IOException {
         if (iis == null) {
             throw new IllegalStateException(I18N.getString("GetNumImages0"));
         }
         if (seekForwardOnly && allowSearch) {

@@ -208,10 +210,11 @@
             throw new IIOException(I18N.getString("BMPImageReader6"), e);
         }
         return width;
     }
 
+    @Override
     public int getHeight(int imageIndex) throws IOException {
         checkIndex(imageIndex);
         try {
             readHeader();
         } catch (IllegalArgumentException e) {

@@ -760,10 +763,11 @@
         bitmapStart = iis.getStreamPosition();
 
         gotHeader = true;
     }
 
+    @Override
     public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
       throws IOException {
         checkIndex(imageIndex);
         try {
             readHeader();

@@ -774,14 +778,16 @@
         list.add(new ImageTypeSpecifier(originalColorModel,
                                         originalSampleModel));
         return list.iterator();
     }
 
+    @Override
     public ImageReadParam getDefaultReadParam() {
         return new ImageReadParam();
     }
 
+    @Override
     public IIOMetadata getImageMetadata(int imageIndex)
       throws IOException {
         checkIndex(imageIndex);
         if (metadata == null) {
             try {

@@ -791,24 +797,27 @@
             }
         }
         return metadata;
     }
 
+    @Override
     public IIOMetadata getStreamMetadata() throws IOException {
         return null;
     }
 
+    @Override
     public boolean isRandomAccessEasy(int imageIndex) throws IOException {
         checkIndex(imageIndex);
         try {
             readHeader();
         } catch (IllegalArgumentException e) {
             throw new IIOException(I18N.getString("BMPImageReader6"), e);
         }
         return metadata.compression == BI_RGB;
     }
 
+    @Override
     public BufferedImage read(int imageIndex, ImageReadParam param)
         throws IOException {
 
         if (iis == null) {
             throw new IllegalStateException(I18N.getString("BMPImageReader5"));

@@ -1045,14 +1054,16 @@
             processImageComplete();
 
         return bi;
     }
 
+    @Override
     public boolean canReadRaster() {
         return true;
     }
 
+    @Override
     public Raster readRaster(int imageIndex,
                              ImageReadParam param) throws IOException {
         BufferedImage bi = read(imageIndex, param);
         return bi.getData();
     }

@@ -1062,10 +1073,11 @@
         bi = null;
         sampleModel = originalSampleModel = null;
         colorModel = originalColorModel = null;
     }
 
+    @Override
     public void reset() {
         super.reset();
         iis = null;
         resetHeaderInfo();
     }
< prev index next >