org.objectweb.jonas_lib.files
Class FileUtils

java.lang.Object
  extended byorg.objectweb.jonas_lib.files.FileUtils

public class FileUtils
extends java.lang.Object

This class manages operation done many times by JOnAS on files, like copying them.

Author:
Florent Benoit

Method Summary
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 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
 

Method Detail

unpack

public static void unpack(java.util.jar.JarFile packedJar,
                          java.io.File dest)
                   throws FileUtilsException
Unpack the source archive in a given directory and returns directory directory created.

Parameters:
packedJar - source JarFile to be unpacked
dest - the destination folder
Throws:
FileUtilsException - When unpack fails

copyFile

public static void copyFile(java.lang.String src,
                            java.lang.String dest)
                     throws FileUtilsException
Copy a file

Parameters:
src - source file
dest - dest file
Throws:
FileUtilsException - if the copy of the file failed

copyFile

public static void copyFile(java.io.File src,
                            java.io.File dest)
                     throws FileUtilsException
Copy a file

Parameters:
src - source file
dest - dest file
Throws:
FileUtilsException - if the copy of the file failed