org.gloin.resource
Class ResourceAccessProxy

java.lang.Object
  |
  +--org.gloin.resource.ResourceAccessProxy
All Implemented Interfaces:
ResourceAccess, java.io.Serializable

public class ResourceAccessProxy
extends java.lang.Object
implements ResourceAccess, java.io.Serializable

Simple implementation of ResourceAccess interface which uses a reference to an input stream factory to deliver resources to requesting clients.

See Also:
Serialized Form

Constructor Summary
ResourceAccessProxy(InputStreamFactory inputFactory)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.io.InputStream getResourceAsStream(java.lang.String resourceName)
          Obtain an input stream for the resource with name, name.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceAccessProxy

public ResourceAccessProxy(InputStreamFactory inputFactory)
Method Detail

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String resourceName)
                                        throws java.io.IOException
Description copied from interface: ResourceAccess
Obtain an input stream for the resource with name, name. name may be a '/' separated path of strings. This method is intended to operate as an analog to URLClassLoader.getResourceAsStream()
Specified by:
getResourceAsStream in interface ResourceAccess
Following copied from interface: net.gloin.resource.ResourceAccess
Parameters:
name - the name of the resource for which an inputstream will be returned.
Returns:
an input stream for the resource with name, name.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object