Skip navigation links


org.apache.myfaces.trinidad.resource
Class ProxyResourceLoader

java.lang.Object
  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
 java.net.URL getResource(java.lang.String path)
          Finds the resource with the given name.

 

Methods inherited from class org.apache.myfaces.trinidad.resource.ResourceLoader
findResource, getContentType, getNullResourceLoader, getParent, isCachable, toString

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ProxyResourceLoader

public ProxyResourceLoader(ResourceLoader parent)
Constructs a new ProxyResourceLoader with specified parent.
Parameters:
parent - the parent resource loader

Method Detail

getResource

public java.net.URL getResource(java.lang.String path)
                         throws java.io.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 invoke ResourceLoader.findResource(String) to find the resource. Failing that, the method will invoke getResource(String) on the parent.

Overrides:
getResource in class ResourceLoader
Parameters:
path - the resource name
Returns:
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.
Throws:
java.io.IOException

Skip navigation links


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