NITRO Java bindings - cannot close image handle

  • I have just come across an issue with NITRO's Java ImageIO bindings - the NITFReader getInput() method does not return a reference to the IOHandle which means that the handle cannot be closed.

    Could someone please submit the following patch (implementation for the getInput() method in java/nitf.imageio/src/java/nitf/imageio/, as I do not seem to have the required persmissions to open a relevant ticket?

    Index: java/nitf.imageio/src/java/nitf/imageio/
    --- java/nitf.imageio/src/java/nitf/imageio/ (revision 1287)
    +++ java/nitf.imageio/src/java/nitf/imageio/ (working copy)
    @@ -106,6 +106,11 @@
                         "Currently, the input must be a File");
    +    @Override
    +    public Object getInput() {
    +        return this.handle;
    +    }
         public synchronized void readHeader() throws IOException
  • Adam Sylvester
    Adam Sylvester

    Thanks for pointing this out Georgios - I've incorporated this into rev 1288 of the trunk.