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)
ResourceCache
write
in interface ResourceCache
resourceId
- the resource id, never null
.data
- the datapublic boolean isCached(String resourceId)
ResourceCache
isCached
in interface ResourceCache
resourceId
- The resourceIdpublic byte[] read(String resourceId)
ResourceCache
read
in interface ResourceCache
resourceId
- the resource id.public void clear(String resourceId)
ResourceCache
clear
in interface ResourceCache
resourceId
- the resource idntifer, not null.Copyright © 2012-2015 JavaMoney. All Rights Reserved.