com.atlassian.confluence.it.resource
Class Classpath
java.lang.Object
com.atlassian.confluence.it.resource.Classpath
public class Classpath
- extends java.lang.Object
Provides access to resources on the integration test classpath.
Method Summary |
static byte[] |
getBytes(java.lang.String resourcePath)
Returns a byte array with the data from a classpath resource. |
static java.io.File |
getFile(java.lang.String resourcePath)
Loads a resource from the classpath into a temporary file and returns that file. |
static java.net.URL |
getResource(java.lang.String resourcePath)
|
static java.io.InputStream |
getResourceAsStream(java.lang.String resourcePath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Classpath
public Classpath()
getFile
public static java.io.File getFile(java.lang.String resourcePath)
- Loads a resource from the classpath into a temporary file and returns that file.
- Returns:
- a File containing the contents of the classpath resource.
- Throws:
java.lang.RuntimeException
- if an error occurred copying the classpath resource to a temporary location
getBytes
public static byte[] getBytes(java.lang.String resourcePath)
- Returns a byte array with the data from a classpath resource.
- Returns:
- a byte array with the contents of the classpath resource.
- Throws:
java.lang.RuntimeException
- if an error occurred loading the classpath resource
getResourceAsStream
public static java.io.InputStream getResourceAsStream(java.lang.String resourcePath)
getResource
public static java.net.URL getResource(java.lang.String resourcePath)
Copyright © 2003-2010 Atlassian. All Rights Reserved.