public class ResourcesUtils
extends java.lang.Object
Utility class providing handy methods to deal with Resources.
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
loadResource(java.lang.String resourceName,
boolean exceptionWhenNotFound)
Loads the resource with the provided name from the classpath.
|
public static java.lang.String loadResource(java.lang.String resourceName,
boolean exceptionWhenNotFound)
Loads the resource with the provided name from the classpath. When param exceptionWhenNotFound
set to true, a RuntimeException is thrown when the resource cannot be loaded.
resourceName - the name of the resource to loadexceptionWhenNotFound - throw a RuntimeException when the resource could not be loadedjava.lang.RuntimeException - when exceptionWhenNotFound is set to true and resource cannot be loaded