Package net.targetr.wtm3.cache
Class ZipFileResourceCache
java.lang.Object
net.targetr.wtm3.cache.ResourceCache
net.targetr.wtm3.cache.ZipFileResourceCache
A ResourceCache that loads resources from a zip file.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.targetr.wtm3.cache.ResourceCache
ResourceCache.CacheEntry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamopenInputStream(String path) Opens an input stream to the resource.Methods inherited from class net.targetr.wtm3.cache.ResourceCache
contains, get, invalidate
-
Constructor Details
-
ZipFileResourceCache
Constructs a ZipFileResourceCache.- Parameters:
zipFile- the zip file to read resources from
-
-
Method Details
-
openInputStream
Description copied from class:ResourceCacheOpens an input stream to the resource.- Specified by:
openInputStreamin classResourceCache- Parameters:
path- the path to the resource in the class path.- Returns:
- an input stream to the resource, or null if not found.
- Throws:
IOException- if an I/O error occurs.
-