public class ResourceUtilities extends Object
| Constructor and Description |
|---|
ResourceUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
loadResource(String resourceFile)
Loads a resource either from the local resource directory or from the classpath
|
static InputStream |
loadResource(URL resourceURL)
Overloaded version of
loadResource(String) to work with lsDirectory. |
static String[] |
lsDirectory(String resourceDir,
String dirListingFile)
Lists the contents of a directory that exists either in the local path or in the classpath
|
public static InputStream loadResource(String resourceFile)
resourceFile - The name of the resource filepublic static InputStream loadResource(URL resourceURL)
loadResource(String) to work with lsDirectory. Loads a
resource either from the local resource directory or from the classpathpublic static String[] lsDirectory(String resourceDir, String dirListingFile) throws IOException
resourceDir - The name of the directorydirListingFile - In case the directory is in a jar we need to have an index given to usIOExceptionCopyright © 2017. All rights reserved.