Package net.targetr.wtm3.cache
Class ClassPathResourceCache
java.lang.Object
net.targetr.wtm3.cache.ResourceCache
net.targetr.wtm3.cache.ClassPathResourceCache
A ResourceCache that reads resources from the classpath.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.targetr.wtm3.cache.ResourceCache
ResourceCache.CacheEntry -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassPathResourceCacheget()Get the singleton instance of the ResourceCache.protected InputStreamopenInputStream(String path) Opens an input stream to the resource.Methods inherited from class net.targetr.wtm3.cache.ResourceCache
contains, get, invalidate
-
Method Details
-
get
Get the singleton instance of the ResourceCache.- Returns:
- the singleton instance of the ResourceCache
-
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.
-