InputStream is = getInputStream(uri); if (is != null) { try { img = ImageIO.read(is); } catch (Exception e) { XRLog.exception("Can't read image file; unexpected problem for URI '" + uri + "'", e);
uri = resolveURI(uri); img = (Image) imageCache.get(uri); if (img == null) { InputStream is = getInputStream(uri); if (is != null) { try { img = ImageIO.read(is); imageCache.put(uri, img); } catch (Exception e) { XRLog.exception("Can't read image file; unexpected problem for URI '" + uri + "'", e); }
    public Image getImage(String uri) {        Image img = null;        InputStream is = getInputStream(uri);        if (is != null) {            try {                img = ImageIO.read(is);            } catch (Exception e) {                XRLog.exception("Can't read image file; unexpected problem for URI '" + uri + "'", e);            }        }        return img;    }