nl.lxtreme.ols.test
Class ResourceUtils

java.lang.Object
  extended by nl.lxtreme.ols.test.ResourceUtils

public final class ResourceUtils
extends Object

Author:
jawi

Method Summary
static URL getResource(Class<?> aClass, String aName)
          Returns the resource with the given name from the "datafiles"-directory.
static URL getResource(Class<?> aClass, String aBaseDir, String aName)
          Returns the resource with the given name from the given base directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResource

public static URL getResource(Class<?> aClass,
                              String aName)
Returns the resource with the given name from the "datafiles"-directory.

Parameters:
aClass - the class to which the resource should be located, cannot be null;
aName - the resource name, including file extension, cannot be null.
Returns:
the URI pointing to the requested resource, never null .

getResource

public static URL getResource(Class<?> aClass,
                              String aBaseDir,
                              String aName)
Returns the resource with the given name from the given base directory.

Parameters:
aClass - the class to which the resource should be located, cannot be null;
aBaseDir - the base directory where the resource should be located, cannot be null;
aName - the resource name, including file extension, cannot be null.
Returns:
the URI pointing to the requested resource, never null .


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.