Code example for SoftReference

Methods: get

0
				} 
			} 
			 
			bitmap = readBitmapFromNetwork(thingInfo.getThumbnail());
			 
			ref = new SoftReference<Bitmap>(bitmap);
			cache.put(thingInfo.getThumbnail(), ref);
			thingInfo.setThumbnailBitmap(ref.get());
		} 
	} 
	 
    private InputStream fetch(String urlString) throws MalformedURLException, IOException {
    	HttpGet request = new HttpGet(urlString);
    	HttpResponse response = mClient.execute(request);
    	return response.getEntity().getContent();
    } 
     
	private Bitmap readBitmapFromNetwork( String url ) {
		if (url == null)
			return null;