< prev index next >

src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageReader.java

Print this page

        

@@ -134,10 +134,11 @@
 
     public TIFFImageReader(ImageReaderSpi originatingProvider) {
         super(originatingProvider);
     }
 
+    @Override
     public void setInput(Object input,
             boolean seekForwardOnly,
             boolean ignoreMetadata) {
         super.setInput(input, seekForwardOnly, ignoreMetadata);
 

@@ -243,10 +244,11 @@
         }
         currIndex = imageIndex;
         return imageIndex;
     }
 
+    @Override
     public int getNumImages(boolean allowSearch) throws IOException {
         if (stream == null) {
             throw new IllegalStateException("Input not set!");
         }
         if (seekForwardOnly && allowSearch) {

@@ -260,10 +262,11 @@
             this.numImages = locateImage(Integer.MAX_VALUE) + 1;
         }
         return numImages;
     }
 
+    @Override
     public IIOMetadata getStreamMetadata() throws IIOException {
         readHeader();
         return streamMetadata;
     }
 

@@ -485,15 +488,17 @@
         } else {
             return f.getAsInt(0);
         }
     }
 
+    @Override
     public int getWidth(int imageIndex) throws IOException {
         seekToImage(imageIndex);
         return getWidth();
     }
 
+    @Override
     public int getHeight(int imageIndex) throws IOException {
         seekToImage(imageIndex);
         return getHeight();
     }
 

@@ -697,10 +702,11 @@
         if (f != null) {
             extraSamples = f.getAsInts();
         }
     }
 
+    @Override
     public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IIOException {
         List<ImageTypeSpecifier> l; // List of ImageTypeSpecifiers
 
         Integer imageIndexInteger = Integer.valueOf(imageIndex);
         if (imageTypeMap.containsKey(imageIndexInteger)) {

@@ -824,10 +830,11 @@
         }
 
         return l.iterator();
     }
 
+    @Override
     public IIOMetadata getImageMetadata(int imageIndex) throws IIOException {
         seekToImage(imageIndex);
         TIFFImageMetadata im
                 = new TIFFImageMetadata(imageMetadata.getRootIFD().getTagSetList());
         Node root

@@ -842,10 +849,11 @@
         Node root = sm.getAsTree(TIFFStreamMetadata.NATIVE_METADATA_FORMAT_NAME);
         sm.setFromTree(TIFFStreamMetadata.NATIVE_METADATA_FORMAT_NAME, root);
         return sm;
     }
 
+    @Override
     public boolean isRandomAccessEasy(int imageIndex) throws IOException {
         if (currIndex != -1) {
             seekToImage(currIndex);
             return getCompression() == BaselineTIFFTagSet.COMPRESSION_NONE;
         } else {

@@ -856,40 +864,47 @@
     // Thumbnails
     public boolean readSupportsThumbnails() {
         return false;
     }
 
+    @Override
     public boolean hasThumbnails(int imageIndex) {
         return false;
     }
 
+    @Override
     public int getNumThumbnails(int imageIndex) throws IOException {
         return 0;
     }
 
+    @Override
     public ImageReadParam getDefaultReadParam() {
         return new TIFFImageReadParam();
     }
 
+    @Override
     public boolean isImageTiled(int imageIndex) throws IOException {
         seekToImage(imageIndex);
 
         TIFFField f
                 = imageMetadata.getTIFFField(BaselineTIFFTagSet.TAG_TILE_WIDTH);
         return f != null;
     }
 
+    @Override
     public int getTileWidth(int imageIndex) throws IOException {
         seekToImage(imageIndex);
         return getTileOrStripWidth();
     }
 
+    @Override
     public int getTileHeight(int imageIndex) throws IOException {
         seekToImage(imageIndex);
         return getTileOrStripHeight();
     }
 
+    @Override
     public BufferedImage readTile(int imageIndex, int tileX, int tileY)
             throws IOException {
 
         int w = getWidth(imageIndex);
         int h = getHeight(imageIndex);

@@ -916,14 +931,16 @@
         param.setSourceRegion(tileRect);
 
         return read(imageIndex, param);
     }
 
+    @Override
     public boolean canReadRaster() {
         return false;
     }
 
+    @Override
     public Raster readRaster(int imageIndex, ImageReadParam param)
             throws IOException {
         throw new UnsupportedOperationException();
     }
 

@@ -1007,10 +1024,11 @@
                         "Destination band out of range!");
             }
         }
     }
 
+    @Override
     public RenderedImage readAsRenderedImage(int imageIndex,
             ImageReadParam param)
             throws IOException {
         prepareRead(imageIndex, param);
         return new TIFFRenderedImage(this, imageIndex, imageReadParam,

@@ -1133,10 +1151,11 @@
                 dstMinX, dstMinY, dstWidth, dstHeight,
                 1, 1,
                 destinationBands);
     }
 
+    @Override
     public BufferedImage read(int imageIndex, ImageReadParam param)
             throws IOException {
         prepareRead(imageIndex, param);
         this.theImage = getDestination(param,
                 getImageTypes(imageIndex),

@@ -1351,10 +1370,11 @@
         }
         processImageComplete();
         return theImage;
     }
 
+    @Override
     public void reset() {
         super.reset();
         resetLocal();
     }
 
< prev index next >