org.ujac.util.io
Class ClassResourceLoader

java.lang.Object
  extended by org.ujac.util.io.ClassResourceLoader
All Implemented Interfaces:
ResourceLoader

public class ClassResourceLoader
extends Object
implements ResourceLoader

Name: ClassResourceLoader
Description: A resource loader using the current thread's context class loader.

Author:
kmurthy

Constructor Summary
ClassResourceLoader()
           
 
Method Summary
 byte[] loadResource(String location)
          Loads a binary resource.
 boolean resourceExists(String location)
          Checks whether or not the desired resource exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassResourceLoader

public ClassResourceLoader()
Method Detail

loadResource

public byte[] loadResource(String location)
                    throws IOException
Description copied from interface: ResourceLoader
Loads a binary resource.

Specified by:
loadResource in interface ResourceLoader
Parameters:
location - The location of the resource.
Returns:
The loaded resource.
Throws:
IOException - In case the loading of the resource failed.
See Also:
ResourceLoader.loadResource(java.lang.String)

resourceExists

public boolean resourceExists(String location)
Description copied from interface: ResourceLoader
Checks whether or not the desired resource exists.

Specified by:
resourceExists in interface ResourceLoader
Parameters:
location - The location of the resource.
Returns:
true in case the given resource could be located, else false.
See Also:
ResourceLoader.resourceExists(java.lang.String)


Copyright © 2003-2004 UJAC.org. All Rights Reserved.