com.atlassian.confluence.it.resource
Class Classpath
java.lang.Object
com.atlassian.confluence.it.resource.Classpath
public class Classpath
- extends Object
Provides access to resources on the integration test classpath.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Classpath
public Classpath()
getFile
public static File getFile(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:
RuntimeException
- if an error occurred copying the classpath resource to a temporary location
getBytes
public static byte[] getBytes(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:
RuntimeException
- if an error occurred loading the classpath resource
getResourceAsStream
public static InputStream getResourceAsStream(String resourcePath)
getResource
public static URL getResource(String resourcePath)
Copyright © 2003-2012 Atlassian. All Rights Reserved.