String key = url.toString( ); Image image = getImageRegistry( ).get( key ); if ( image != null ) { return image; } InputStream in = null; try { in = url.openStream( ); image = new Image( null, in ); } catch ( IOException e ) { throw e; } finally { if ( in != null ) { in.close( ); } } if ( image != null ) { getImageRegistry( ).put( key, image ); } return image;
return loadImage(url);
	public Image loadImage( String uri ) throws IOException	{		URL url = generateURL( uri );		if ( url == null )		{			throw new FileNotFoundException( uri );		}		String key = url.toString( );		Image image = getImageRegistry( ).get( key );		if ( image != null )		{			return image;		}		InputStream in = null;		try		{			in = url.openStream( );			image = new Image( null, in );		}		catch ( IOException e )		{			throw e;		}		finally		{			if ( in != null )			{				in.close( );			}		}		if ( image != null )		{			getImageRegistry( ).put( key, image );		}		return image;	}