public final class ResourceLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_PREFIX |
static String |
RESOURCE_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
static String |
getContent(File file) |
static String |
getContent(String resource)
Reads the contents of a resource as a string.
|
static InputStream |
open(String path)
Opens a given path as either a resource or a file, depending on the path
name.
|
static InputStream |
openResource(String resource)
Opens a resource
|
public static final String RESOURCE_PREFIX
public static final String FILE_PREFIX
public static InputStream open(String path) throws IOException
path - IOExceptionpublic static InputStream openResource(String resource) throws FileNotFoundException
resource - FileNotFoundExceptionpublic static String getContent(String resource) throws IOException
resource - IOExceptionpublic static String getContent(File file) throws IOException
file - IOExceptionCopyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.