java.lang.Objectorg.objectweb.telosys.util.FileUtil
Utility class for FILE operations ( set of static methods )
Method Summary | |
static void |
copy(java.lang.String sInputFileName,
java.lang.String sOutputFileName)
Copy a file into another one |
static boolean |
delete(java.lang.String sFileName)
Delete a file (and only a file) |
static boolean |
exists(java.lang.String sFileName)
Checks the existence of a file |
static boolean |
isFile(java.lang.String sFileName)
Deprecated. use "exists" instead |
static byte[] |
load(java.lang.String sFileName)
Load a file content in memory |
static void |
save(java.lang.String sFileName,
byte[] content)
Save a memory content in a file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void save(java.lang.String sFileName, byte[] content) throws TelosysException
sFileName
- content
-
TelosysException
public static byte[] load(java.lang.String sFileName) throws TelosysException
sFileName
-
TelosysException
public static void copy(java.lang.String sInputFileName, java.lang.String sOutputFileName) throws TelosysException
sInputFileName
- sOutputFileName
-
TelosysException
public static boolean delete(java.lang.String sFileName) throws TelosysException
sFileName
- the full name of the file to delete
TelosysException
- if the given filename is not a 'normal file' ( directory or other )public static boolean exists(java.lang.String sFileName)
sFileName
-
public static boolean isFile(java.lang.String sFileName)
sFileName
-