public class FileFinder extends Object
| Constructor and Description |
|---|
FileFinder() |
| Modifier and Type | Method and Description |
|---|---|
static URL |
find(Class<?> clazz,
String name)
Tries to find the file specified from filesystem or classpath.
|
static URL |
find(String name)
Tries to find the file specified from filesystem or classpath.
|
static String |
load(Class<?> clazz,
String name)
Finds and loads a file.
|
static String |
load(String name)
Finds and loads a file.
|
static InputStream |
open(Class<?> clazz,
String name)
Tries to find the file specified from filesystem or classpath.
|
static InputStream |
open(String name)
Tries to find the file specified from filesystem or classpath.
|
public static URL find(String name)
name - - name of file, can be fully qualifiedpublic static URL find(Class<?> clazz, String name)
name - - name of file, can be fully qualifiedclazz - class to get the class loader frompublic static InputStream open(String name) throws IOException
name - - name of file, can be fully qualifiedIOExceptionpublic static InputStream open(Class<?> clazz, String name) throws IOException
name - - name of file, can be fully qualifiedclazz - class to get the class loader fromIOExceptionpublic static String load(String name) throws IOException
name - - name of fileIOExceptionpublic static String load(Class<?> clazz, String name) throws IOException
name - - name of fileclazz - class to get the class loader fromIOExceptionCopyright © 2014. All rights reserved.