public class ResourcesUtils extends Object
Utility class providing handy methods to deal with Resources.
| Modifier and Type | Method and Description |
|---|---|
static String |
loadResource(String resourceName,
boolean exceptionWhenNotFound)
Loads the resource with the provided name from the classpath.
|
public static String loadResource(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 loadedRuntimeException - when exceptionWhenNotFound is set to true and resource cannot be loadedCopyright © 2016–2017. All rights reserved.