public class DefaultResourceCache extends Object implements ResourceCache
ResourceCache, using the local file system.| Constructor and Description |
|---|
DefaultResourceCache()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(String resourceId)
Remove a cache entry.
|
boolean |
isCached(String resourceId)
Allows to query if a resource with the given id is present within the
local cache.
|
byte[] |
read(String resourceId)
Reads the given resource, identified by the resourceId, from the cache.
|
String |
toString() |
void |
write(String resourceId,
byte[] data)
Write the given byte array to the internal store and register it on the
given resource ID.
|
public DefaultResourceCache()
public void write(String resourceId, byte[] data)
ResourceCachewrite in interface ResourceCacheresourceId - the resource id, never null.data - the datapublic boolean isCached(String resourceId)
ResourceCacheisCached in interface ResourceCacheresourceId - The resourceIdpublic byte[] read(String resourceId)
ResourceCacheread in interface ResourceCacheresourceId - the resource id.public void clear(String resourceId)
ResourceCacheclear in interface ResourceCacheresourceId - the resource idntifer, not null.Copyright © 2012-2015 JavaMoney. All Rights Reserved.