|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.archiva.common.utils.ResourceUtils
public class ResourceUtils
ResourceUtils
Constructor Summary | |
---|---|
ResourceUtils()
|
Method Summary | |
---|---|
static java.io.File |
getResource(java.lang.String resourcePath)
Lookup resource at the given path relative to the root of the classpath and if it exists return a file object that can be used to access it. |
static java.io.File |
getResource(java.lang.String resourcePath,
java.lang.ClassLoader classloader)
Lookup resource at the given path relative to the root of the classpath and if it exists return a file object that can be used to access it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceUtils()
Method Detail |
---|
public static java.io.File getResource(java.lang.String resourcePath) throws java.io.IOException
At test time the contents of both the src/resources and test/resources dirs are available at the root of the classpath.
To retrieve the file src/test/resources/sometest/test.properties use getResource("/sometest/test.properties").
resourcePath
- the path to the resource relative to the root of the classpath
java.io.IOException
public static java.io.File getResource(java.lang.String resourcePath, java.lang.ClassLoader classloader) throws java.io.IOException
At test time the contents of both the src/resources and test/resources dirs are available at the root of the classpath.
To retrieve the file src/test/resources/sometest/test.properties use getResource("/sometest/test.properties").
resourcePath
- the path to the resource relative to the root of the classpathclassloader
- the classloader who's classpath should be searched for the resource
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |