public interface

GalleryUrlImageCache

com.droidux.pack.gallery.cache.GalleryUrlImageCache
Known Indirect Subclasses

Class Overview

A cache that holds the downloaded web images.

Summary

Nested Classes
class GalleryUrlImageCache.Default Default implementation of the UrlImageCache. 
Public Methods
abstract void clear()
Clear the cache.
abstract Bitmap get(String url)
Gets the bitmap for the specified url from the cache.
abstract Bitmap getFast(String url)
For efficiency, if the requested Bitmap is available for quick fetch, for example from memory cache, it will be returned here.
abstract void put(String url, Bitmap bitmap)
Store the bitmap for the specified url in the cache.

Public Methods

public abstract void clear ()

Since: API Level 2.5

Clear the cache.

public abstract Bitmap get (String url)

Since: API Level 2.5

Gets the bitmap for the specified url from the cache. Use getFast(String) first to see whether the image is readily available for quick fetch. The getFast(String) is called in the UI thread, whereas this function is called in the background thread.

Parameters
url The image url.
Returns
  • The requested image.

public abstract Bitmap getFast (String url)

Since: API Level 2.5

For efficiency, if the requested Bitmap is available for quick fetch, for example from memory cache, it will be returned here. This function will be called in the UI thread. The get(String) function will be called in the background thread to allow for longer fetch, for example from 2nd level/disk cache.

Parameters
url The image url.
Returns
  • The requested image.

public abstract void put (String url, Bitmap bitmap)

Since: API Level 2.5

Store the bitmap for the specified url in the cache.

Parameters
url The image url.
bitmap The web image.