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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CachingResourceLoader(ResourceLoader parent)` Constructs a new CachingResourceLoader.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected URL` | `findResource(String path)` Returns the cached resource url if previously requested.
    `boolean` | `isCachable()` Returns whether a resource is cachable.

    - ### Methods inherited from class org.apache.myfaces.trinidad.resource.ResourceLoader

      `getContentType, getContentType, getNullResourceLoader, getParent, getResource, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CachingResourceLoader

          public CachingResourceLoader(ResourceLoader parent)

      Constructs a new CachingResourceLoader.
      Parameters:
        `parent` - the parent resource loader

  - ### Method Detail

    - #### findResource

          protected URL findResource(String path)
                              throws 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:
        `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:

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.