ResourceCache, using the local file system.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | cachedResources
Cached resources. |
| private File | localDir
Local temp directory. |
| private static final Logger | LOG
The logger used. |
| private static final String | SUFFIX
Suffix for files created. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear(String resourceId)
Implements org. Remove a cache entry. |
| public boolean | isCached(String resourceId)
Implements org. Allows to query if a resource with the given id is present within the local cache. |
| public byte[] | read(String resourceId)
Implements org. Reads the given resource, identified by the resourceId, from the cache. |
| public String | |
| public void | write(String resourceId, byte[] data)
Implements org. Write the given byte array to the format store and register it on the given resource ID. |
| cachedResources | back to summary |
|---|---|
| private final Map<String, File> cachedResources Cached resources. | |
| localDir | back to summary |
|---|---|
| private File localDir Local temp directory. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG The logger used. | |
| SUFFIX | back to summary |
|---|---|
| private static final String SUFFIX Suffix for files created. | |
| OkHttpResourceCache | back to summary |
|---|---|
| public OkHttpResourceCache() Constructor. | |
| clear | back to summary |
|---|---|
| public void clear(String resourceId) Implements org. Doc from org. Remove a cache entry.
| |
| isCached | back to summary |
|---|---|
| public boolean isCached(String resourceId) Implements org. Doc from org. Allows to query if a resource with the given id is present within the local cache.
| |
| read | back to summary |
|---|---|
| public byte[] read(String resourceId) Implements org. Doc from org. Reads the given resource, identified by the resourceId, from the cache.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| write | back to summary |
|---|---|
| public void write(String resourceId, byte[] data) Implements org. Doc from org. Write the given byte array to the format store and register it on the given resource ID.
| |