Class ProxyResourceLoader

  extended by org.apache.myfaces.trinidad.resource.ResourceLoader
      extended by org.apache.myfaces.trinidad.resource.ProxyResourceLoader

public class ProxyResourceLoader
extends ResourceLoader

A resource loader implementation that proxies another resource loader, controlling the URLConnection.

Nested Class Summary
protected  class ProxyResourceLoader.ProxyURLConnection
          Helper class used to manage aggregated URL input stream.
Constructor Summary
ProxyResourceLoader(ResourceLoader parent)
          Constructs a new ProxyResourceLoader with specified parent.
Method Summary
 URL getResource(String path)
          Finds the resource with the given name.
Methods inherited from class org.apache.myfaces.trinidad.resource.ResourceLoader
findResource, getContentType, getContentType, getNullResourceLoader, getParent, isCachable, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public ProxyResourceLoader(ResourceLoader parent)
Constructs a new ProxyResourceLoader with specified parent.

parent - the parent resource loader
Method Detail


public URL getResource(String path)
                throws IOException
Description copied from class: ResourceLoader
Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

The name of a resource is a '/'-separated path name that identifies the resource.

This method will first search the this resource loader for the resource. That failing, this method will invoke ResourceLoader.findResource(String) to on the parent resource loader to find the resource.

getResource in class ResourceLoader
path - the resource name
A URL object for reading the resource, or null if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.

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