public class ImageCache extends java.lang.Object
IcyBufferedImage.getDataXY(int)
image data.Modifier and Type | Field and Description |
---|---|
static AbstractCache |
cache |
Constructor and Description |
---|
ImageCache() |
Modifier and Type | Method and Description |
---|---|
static void |
end()
Call it when you're done with the cache (release all resources and cleanup)
|
static java.util.Map<IcyBufferedImage,java.lang.Object> |
get(java.util.Collection<IcyBufferedImage> keys)
Get all data array from cache from a given Collection of
IcyBufferedImage |
static java.lang.Object |
get(IcyBufferedImage key)
Get the corresponding data array (2D native array) from cache from a given
IcyBufferedImage |
static java.util.Collection<IcyBufferedImage> |
getAllKeys()
Get all data
IcyBufferedImage in the cache |
static boolean |
isEnabled() |
static boolean |
isInCache(IcyBufferedImage image) |
static boolean |
isOnDiskCache(IcyBufferedImage image) |
static boolean |
isOnMemoryCache(IcyBufferedImage image) |
static void |
remove(IcyBufferedImage key)
Remove an object from the cache from its key
|
static void |
set(IcyBufferedImage key,
java.lang.Object object,
boolean eternal)
Put the specified data array (2D native array) into cache with its associated key
|
static long |
usedDisk()
Return used disk space for cache (in bytes)
|
static long |
usedMemory()
Return used memory for cache (in bytes)
|
public static final AbstractCache cache
public ImageCache()
public static boolean isEnabled()
public static boolean isInCache(IcyBufferedImage image)
public static boolean isOnMemoryCache(IcyBufferedImage image)
public static boolean isOnDiskCache(IcyBufferedImage image)
public static long usedMemory()
public static long usedDisk()
public static java.util.Collection<IcyBufferedImage> getAllKeys() throws CacheException
IcyBufferedImage
in the cacheCacheException
public static java.lang.Object get(IcyBufferedImage key) throws CacheException
IcyBufferedImage
CacheException
public static java.util.Map<IcyBufferedImage,java.lang.Object> get(java.util.Collection<IcyBufferedImage> keys) throws CacheException
IcyBufferedImage
CacheException
public static void set(IcyBufferedImage key, java.lang.Object object, boolean eternal) throws CacheException
CacheException
public static void remove(IcyBufferedImage key) throws CacheException
CacheException
public static void end()