public class ResourceUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
getResourceAsFile(java.lang.String path)
Returns the file corresponding to the given path.
|
static java.lang.String |
readResourceFileToString(java.lang.String path)
Reads the contents of a resource to a string.
|
static java.util.List<java.lang.String> |
readResourceFileToStringList(java.lang.String path)
Reads the contents of a resource to a list of strings.
|
public static java.lang.String readResourceFileToString(java.lang.String path)
throws java.io.IOException
path - The path of the resource that shall be read.java.io.IOException - Throws an IOException if the file could not be read.public static java.util.List<java.lang.String> readResourceFileToStringList(java.lang.String path)
throws java.io.IOException
path - The path of the resource that shall be read.java.io.IOException - Throws an IOException if the file could not be read.java.io.FileNotFoundException - Thrown if the file could not be found.public static java.io.File getResourceAsFile(java.lang.String path)
path - The path for which a resource shall be retrieved.