YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
de.yaacc.util.image.IconDownloadCacheHandler Class Reference

Provides cache functionality for Bitmap images in lists. More...

Collaboration diagram for de.yaacc.util.image.IconDownloadCacheHandler:
Collaboration graph

Public Member Functions

Bitmap getBitmap (Uri uri, int width, int height)
 Loads image from cache.
 
void addBitmap (Uri uri, int width, int height, Bitmap img)
 Adds image to cache.
 
void resetCache ()
 Clear the whole cache.
 

Static Public Member Functions

static IconDownloadCacheHandler getInstance ()
 Provides access to the current instance.If none exists a new one is created.
 

Detailed Description

Provides cache functionality for Bitmap images in lists.

Implemented as singleton to assure the is always just one instance. Since there is always only one list shown at once there must not be any other caches.

Author
Christoph Hähnel (eyeless)

Member Function Documentation

◆ addBitmap()

void de.yaacc.util.image.IconDownloadCacheHandler.addBitmap ( Uri  uri,
int  width,
int  height,
Bitmap  img 
)

Adds image to cache.

Parameters
uriuri the image is saved at
imgimage to save

Referenced by de.yaacc.util.image.IconDownloadTask.doInBackground(), and de.yaacc.util.image.ImageDownloadTask.doInBackground().

Here is the caller graph for this function:

◆ getBitmap()

Bitmap de.yaacc.util.image.IconDownloadCacheHandler.getBitmap ( Uri  uri,
int  width,
int  height 
)

Loads image from cache.

Parameters
uriuri the image is saved at
Returns
required image

Referenced by de.yaacc.util.image.IconDownloadTask.doInBackground(), and de.yaacc.util.image.ImageDownloadTask.doInBackground().

Here is the caller graph for this function:

◆ getInstance()

static IconDownloadCacheHandler de.yaacc.util.image.IconDownloadCacheHandler.getInstance ( )
static

Provides access to the current instance.If none exists a new one is created.

Returns
instance with empty cache

Referenced by de.yaacc.util.image.ImageDownloadTask.ImageDownloadTask().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: