Is FileImageInputStream a buffered reader? is this code the best code for finding out Image Dimensions?
<p>Hi we are running this code our production server and we are exprince some IO problems is this our problem? We are handling alot of images on the server. Thankfull for all suggestions. </p>

<pre><code>private Dimension getImageDim(final String path) {
    Dimension result = new Dimension(0, 0);
    String suffix = this.getFileSuffix(path);   
    Iterator&lt;ImageReader&gt; iterator = ImageIO.getImageReadersBySuffix(suffix);
    if (iterator.hasNext()) {
       ImageReader reader = iterator.next();
       ImageInputStream stream = null;
       try {
           stream = new FileImageInputStream(new File(path));
           reader.setInput(stream);
           int width = reader.getWidth(reader.getMinIndex());
           int height = reader.getHeight(reader.getMinIndex());
           result = new Dimension(width, height);            
       } catch (IOException e) {
           e.printStackTrace();
       } finally {
             try{
                if(stream != null ){
                    stream.close();
                }
             } catch ( Exception e ){
                e.printStackTrace();
             }
               stream = null;
               reader.dispose();
               reader = null;
       }
     }
        return result;
     }

private String getFileSuffix(final String path) {
    String result = null;
    if (path != null) {
       result = "";
       if (path.lastIndexOf('.') != -1) {
            result = path.substring(path.lastIndexOf('.'));
            if (result.startsWith(".")) {
               result = result.substring(1);
            }
       } 
    }
    return result;
}
</code></pre>
