Package net.targetr.wtm3.cache
Class SpeedTestResourceCache
java.lang.Object
net.targetr.wtm3.cache.ResourceCache
net.targetr.wtm3.cache.SpeedTestResourceCache
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 StringgetName()Returns a name assigned to the source of this cache.protected InputStreamopenInputStream(String path) Opens an input stream to the resource.Methods inherited from class net.targetr.wtm3.cache.ResourceCache
get, invalidate
-
Constructor Details
-
SpeedTestResourceCache
public SpeedTestResourceCache()Constructs a ZipFileResourceCache.
-
-
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.
-
getName
Description copied from class:ResourceCacheReturns a name assigned to the source of this cache.- Specified by:
getNamein classResourceCache- Returns:
- the source of this cache.
-