public class

Classpath

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.it.resource.Classpath

Class Overview

Provides access to resources on the integration test classpath.

Summary

Public Constructors
Classpath()
Public Methods
static byte[] getBytes(String resourcePath)
Returns a byte array with the data from a classpath resource.
static File getFile(String resourcePath)
Loads a resource from the classpath into a temporary file and returns that file.
static URL getResource(String resourcePath)
static InputStream getResourceAsStream(String resourcePath)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Classpath ()

Public Methods

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

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

public static URL getResource (String resourcePath)

public static InputStream getResourceAsStream (String resourcePath)