Skip navigation links
org.apache.myfaces.trinidad.resource
Class CachingResourceLoader
java.lang.Object
org.apache.myfaces.trinidad.resource.ResourceLoader
org.apache.myfaces.trinidad.resource.CachingResourceLoader
-
public class CachingResourceLoader
- extends ResourceLoader
Base class for resource loaders. Resource loaders can lookup resources as URLs from arbitrary locations, including JAR files.
| Method Summary |
protected java.net.URL |
findResource(java.lang.String path)
Returns the cached resource url if previously requested. |
boolean |
isCachable()
Returns whether a resource is cachable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CachingResourceLoader
public CachingResourceLoader(ResourceLoader parent)
- Constructs a new CachingResourceLoader.
- Parameters:
parent - the parent resource loader
findResource
protected java.net.URL findResource(java.lang.String path)
throws java.io.IOException
- Returns the cached resource url if previously requested. Otherwise, fully reads the resource contents stores in the cache.
-
- Overrides:
findResource in class ResourceLoader
-
- Parameters:
path - the resource path
- Returns:
- the cached resource url
- Throws:
java.io.IOException - if an I/O error occurs
isCachable
public boolean isCachable()
- Description copied from class:
ResourceLoader
- Returns whether a resource is cachable.
-
- Overrides:
isCachable in class ResourceLoader
-
- Returns:
Skip navigation links
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.