public final class ResourceLoader extends Object
| 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) |
public static InputStream open(String path) throws IOException
path - IOExceptionpublic static InputStream openResource(String resource) throws IOException
resource - FileNotFoundExceptionIOExceptionpublic static String getContent(String resource) throws IOException
resource - IOExceptionpublic static String getContent(File file) throws IOException
file - IOExceptionCopyright © 2007-2012. All Rights Reserved.