public class

MemoryImageCache

extends Object
implements ImageCache
java.lang.Object
   ↳ com.neomades.content.image.MemoryImageCache

Class Overview

Least-Recently-Used memory cache for image loader.

Summary

Public Constructors
MemoryImageCache(int entriesCount)
Public Methods
void clear()
Clear the memory cache.
Image getImage(String url)
Reads the Image from cache for the URL given in parameter.
void putImage(String url, Image bitmap)
Saves an image to the cache.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.neomades.content.image.ImageCache

Public Constructors

public MemoryImageCache (int entriesCount)

Parameters
entriesCount number of last-recent-used images to keep in memory

Public Methods

public void clear ()

Clear the memory cache.

public Image getImage (String url)

Reads the Image from cache for the URL given in parameter.

Returns
  • the image associated to the URL in the cache or null if not found

public void putImage (String url, Image bitmap)

Saves an image to the cache.