|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.util.files.FileUtils
public final class FileUtils
This class manages operation done many times on files, like copying them.
Field Summary | |
---|---|
private static int |
BUFFER_SIZE
Size of the buffer. |
private static JLog |
logger
Logger. |
Constructor Summary | |
---|---|
private |
FileUtils()
Utility class, no public constructor. |
Method Summary | |
---|---|
static void |
copyDirectory(java.io.File src,
java.io.File dest)
Copy a directory recursively. |
static void |
copyDirectory(java.lang.String src,
java.lang.String dest)
Copy a directory recursively. |
static void |
copyFile(java.io.File src,
java.io.File dest)
Copy a file. |
static void |
copyFile(java.lang.String src,
java.lang.String dest)
Copy a file. |
static boolean |
delete(java.io.File f)
|
static boolean |
delete(java.lang.String path)
|
static void |
dump(java.io.InputStream in,
java.io.File entryFile)
Write the given input stream in the given file. |
static void |
unpack(java.util.jar.JarFile packedJar,
java.io.File dest)
Unpack the source archive in a given directory and returns directory directory created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int BUFFER_SIZE
private static JLog logger
Constructor Detail |
---|
private FileUtils()
Method Detail |
---|
public static void unpack(java.util.jar.JarFile packedJar, java.io.File dest) throws FileUtilsException
packedJar
- source JarFile to be unpackeddest
- the destination folder
FileUtilsException
- When unpack failspublic static void dump(java.io.InputStream in, java.io.File entryFile) throws FileUtilsException
in
- the inputStream to copy.entryFile
- the file where the inputStream must be dumped.
FileUtilsException
- if the dump failed.public static void copyFile(java.lang.String src, java.lang.String dest) throws FileUtilsException
src
- source filedest
- dest file
FileUtilsException
- if the copy of the file failedpublic static void copyFile(java.io.File src, java.io.File dest) throws FileUtilsException
src
- source filedest
- dest file
FileUtilsException
- if the copy of the file failedpublic static boolean delete(java.lang.String path)
path
- file/directory to be deleted
public static boolean delete(java.io.File f)
f
- file/directory to be deleted
public static void copyDirectory(java.lang.String src, java.lang.String dest) throws FileUtilsException
src
- source directorydest
- dest directory
FileUtilsException
- if the copy of the directory failedpublic static void copyDirectory(java.io.File src, java.io.File dest) throws FileUtilsException
src
- source directorydest
- dest directory
FileUtilsException
- if the copy of the directory failed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |