|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.launcher.jonas.util.IOUtils
public final class IOUtils
IO utilities.
| Method Summary | |
|---|---|
static boolean |
deleteDir(File dir)
Recursively delete a directory. |
static boolean |
exists(String filename)
Checks if the file exists. |
static Properties |
getPropertiesFromClass(String resource,
Class<?> clazz)
|
static Properties |
getPropertiesFromFile(File filename)
|
static File |
getSystemFile(File base,
String relative)
Return a OS valid File. |
static String |
getSystemPath(File base,
String relative)
Return a OS valid path. |
static Properties |
loadPropertiesFromStream(InputStream is)
Create a Properties from the given InputStream. |
static Map<String,String> |
props2Map(Properties p)
Convert the given properties object into a map |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean deleteDir(File dir)
dir - directory to be deleted
public static String getSystemPath(File base,
String relative)
base - basis directoryrelative - relative path name to the basis directory
public static File getSystemFile(File base,
String relative)
base - basis directoryrelative - relative path name to the basis directory
public static boolean exists(String filename)
filename - File name to be tested
true if the given file exists.
public static Properties getPropertiesFromFile(File filename)
throws IOException
filename - properties file name
Properties instance.
IOException - if file is not found or if file is not a property file.
public static Properties loadPropertiesFromStream(InputStream is)
throws IOException
Properties from the given InputStream. Close the stream
at the end of the operation.
is - InputStream
IOException - if the stream cannot be read or if it doesn't
contains a Propertiespublic static Map<String,String> props2Map(Properties p)
p - the properties object
public static Properties getPropertiesFromClass(String resource,
Class<?> clazz)
throws IOException
resource - properties file name (relative to org/ow2/jonas/launcher/jonas)
Properties instance.
IOException - if file is not found or if file is not a property file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||