Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4444214

Spec: ImageReader - contradiction in readTileRaster description

XMLWordPrintable

    • beta2
    • generic
    • generic



      Name: bkR10012 Date: 04/13/2001


      The spec for the "public Raster readTileRaster(int imageIndex, int tileX,
      int tileY) throws IOException" reads:

      " If canReadRaster() returns false, this method throws an
          UnsupportedOperationException.

          The default implementation calls readRaster(imageIndex, null)
          if tileX and tileY are 0, or throws an IllegalArgumentException otherwise."
               
      Also description of canReadRaster() says:

      "public boolean canReadRaster()

           Returns true if this plug-in supports reading just a Raster of pixel data.
           If this method returns false, calls to readRaster or readTileRaster
           will throw an UnsupportedOperationException."
           
            
      The default implementation of canReadRaster() always returns false.
      So the default implementation of readTileRaster should always throw
      UnsupportedOperationException.
      But, according to the spec., the default implementation of readTileRaster
      may throw an IllegalArgumentException if tileX and tileY are not 0.

      This contradiction should be resolved and spec. should be clarified.
                
      ======================================================================

            dricesunw Daniel Rice (Inactive)
            kuzsunw Kuz Kuz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: