|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.util.IOUtils
public class IOUtils
Some I/O utility methods
| Method Summary | |
|---|---|
static Collection<File> |
listFiles(File root,
FileFilter filter,
boolean recursive)
Collects a list of files, according to a given pattern, from a root directory and recursively. |
static Properties |
readProperties(String respath)
Read a property file from resources |
static String |
readTextResource(Class<?> referenceClass,
String path,
String encoding)
Reads a text resource from a reference class and a resource path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Properties readProperties(String respath)
respath - Resource to be read
public static Collection<File> listFiles(File root,
FileFilter filter,
boolean recursive)
root - Directory to start fromfilter - File filter to userecursive - Indicates if the search must be recursive or not.
null.
public static String readTextResource(Class<?> referenceClass,
String path,
String encoding)
throws net.sf.jstring.LocalizableException
null, the path is computed using
the current class (i.e. the IOUtils class).
If the resource cannot be accessed, a CodeException with code
StringCodes.STRING_ERROR_RESOURCE_NOT_FOUND is thrown.
referenceClass - Reference for the resource pathpath - Resource path from the reference classencoding - Encoding of the target resource
net.sf.jstring.LocalizableException - If the resource cannot be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||