Class FileCache
java.lang.Object
com.realtime.crossfire.jxclient.faces.FileCache
- All Implemented Interfaces:
ImageCache
A disk based cache for image files.
-
Constructor Details
-
FileCache
Creates a new instance.- Parameters:
cacheDir- the directory where the images are saved
-
-
Method Details
-
load
Description copied from interface:ImageCacheRetrieves an image from the cache.- Specified by:
loadin interfaceImageCache- Parameters:
face- the face to retrieve- Returns:
- the image icon, or
nullif the cache does not contain the image
-
save
Description copied from interface:ImageCacheStores anImageIconinto the cache.- Specified by:
savein interfaceImageCache- Parameters:
face- the face to saveimageIcon- the image icon to store
-
save
public void save(@NotNull @NotNull String faceName, int faceChecksum, @NotNull @NotNull Icon imageIcon) Stores anImageIconinto the cache.- Parameters:
faceName- the image name to savefaceChecksum- the checksum to saveimageIcon- the image icon to store
-