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.getName()Returns name of this cache, always returns "classpath"protected InputStreamopenInputStream(String path) Opens an input stream to the resource.Methods inherited from class net.targetr.wtm3.cache.ResourceCache
get, invalidate
-
Method Details
-
getName
Returns name of this cache, always returns "classpath"- Specified by:
getNamein classResourceCache- Returns:
- the string "classpath"
-
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.
-