|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.jsfunit.ant.Utils
public class Utils
Utility Class to handle some file io operations that are extremely useful but for some odd reason not implemeneted in the jdk itself.
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static void |
archive(File explodedArchive,
File destArchive)
Imploded an already exploded archive |
static void |
copy(File srcfile,
File destfile)
Copy a file or directory from one location to another |
static File |
explodeArchive(ZipFile archiveFile,
File destDirectory)
Creates an exploded war from a war archive |
static String |
getArchiveName(ZipFile file)
The getName() method for a ZipFile returns the full file path and not the name of the actual file. |
static void |
unzip(ZipFile zipFile,
File destDirectory)
Unzips a zipFile to the specified directory. |
static void |
zip(File srcDirectory,
File destFile)
Zips a directory |
static void |
zip(File srcDirectory,
File destFile,
Boolean isArchive)
Zips a directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static void copy(File srcfile,
File destfile)
throws Exception
srcfile - The file to copydestfile - The destination for the copied file
Exception - If an exception occured during the copy
public static void unzip(ZipFile zipFile,
File destDirectory)
throws Exception
zipFile - The file to unzipdestDirectory - The directory to unzip the file
Exception - If an error occurs during the unzipping process
public static void zip(File srcDirectory,
File destFile)
throws Exception
srcDirectory - the directory to zipdestFile - the newly created zip file
Exception
public static void zip(File srcDirectory,
File destFile,
Boolean isArchive)
throws Exception
srcDirectory - the directory to zipdestFile - the newly created zip fileisArchive - true if the srcDirectory is a exploded archive
Exception - if an error occured during the zip
public static File explodeArchive(ZipFile archiveFile,
File destDirectory)
throws Exception
archiveFile - The war FiledestDirectory - The directory to explode the war
Exception - If an error occurs when exploding the warpublic static String getArchiveName(ZipFile file)
file - The file to get the file name
public static void archive(File explodedArchive,
File destArchive)
throws Exception
explodedArchive - the directory of the exploded archivedestArchive - the name of the new archive to create
Exception - if an exception occurs during the archive process
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||