|
||||||||||
| 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(java.io.File dir)
Recursively delete a directory. |
static boolean |
exists(java.lang.String filename)
Checks if the file exists. |
static java.util.Properties |
getPropertiesFromClass(java.lang.String resource,
java.lang.Class<?> clazz)
|
static java.util.Properties |
getPropertiesFromFile(java.io.File filename)
|
static java.io.File |
getSystemFile(java.io.File base,
java.lang.String relative)
Return a OS valid File. |
static java.lang.String |
getSystemPath(java.io.File base,
java.lang.String relative)
Return a OS valid path. |
static java.util.Properties |
loadPropertiesFromStream(java.io.InputStream is)
Create a Properties from the given InputStream. |
static java.util.Map<java.lang.String,java.lang.String> |
props2Map(java.util.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(java.io.File dir)
dir - directory to be deleted
public static java.lang.String getSystemPath(java.io.File base,
java.lang.String relative)
base - basis directoryrelative - relative path name to the basis directory
public static java.io.File getSystemFile(java.io.File base,
java.lang.String relative)
base - basis directoryrelative - relative path name to the basis directory
public static boolean exists(java.lang.String filename)
filename - File name to be tested
true if the given file exists.
public static java.util.Properties getPropertiesFromFile(java.io.File filename)
throws java.io.IOException
filename - properties file name
Properties instance.
java.io.IOException - if file is not found or if file is not a property file.
public static java.util.Properties loadPropertiesFromStream(java.io.InputStream is)
throws java.io.IOException
Properties from the given InputStream. Close the stream
at the end of the operation.
is - InputStream
java.io.IOException - if the stream cannot be read or if it doesn't
contains a Propertiespublic static java.util.Map<java.lang.String,java.lang.String> props2Map(java.util.Properties p)
p - the properties object
public static java.util.Properties getPropertiesFromClass(java.lang.String resource,
java.lang.Class<?> clazz)
throws java.io.IOException
resource - properties file name (relative to org/ow2/jonas/launcher/jonas)
Properties instance.
java.io.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 | |||||||||