public class DefaultResourceCache extends Object implements ResourceCache
ResourceCache, using the local file system.| Constructor and Description |
|---|
DefaultResourceCache()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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) throws IOException
ResourceCachewrite in interface ResourceCacheresourceId - the resource id, never null.data - the dataIOException - when an IO error occurs.public boolean isCached(String resourceId)
ResourceCacheisCached in interface ResourceCacheresourceId - The resourceIdpublic byte[] read(String resourceId)
ResourceCacheread in interface ResourceCacheresourceId - the resource id.Copyright © 2012-2014 JavaMoney. All Rights Reserved.