|
|||||||||
| 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(java.io.File explodedArchive,
java.io.File destArchive)
Imploded an already exploded archive |
static void |
copy(java.io.File srcfile,
java.io.File destfile)
Copy a file or directory from one location to another |
static java.io.File |
explodeArchive(java.util.zip.ZipFile archiveFile,
java.io.File destDirectory)
Creates an exploded war from a war archive |
static java.lang.String |
getArchiveName(java.util.zip.ZipFile file)
The getName() method for a ZipFile returns the full file path and not the name of the actual file. |
static void |
unzip(java.util.zip.ZipFile zipFile,
java.io.File destDirectory)
Unzips a zipFile to the specified directory. |
static void |
zip(java.io.File srcDirectory,
java.io.File destFile)
Zips a directory |
static void |
zip(java.io.File srcDirectory,
java.io.File destFile,
java.lang.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(java.io.File srcfile,
java.io.File destfile)
throws java.lang.Exception
srcfile - The file to copydestfile - The destination for the copied file
java.lang.Exception - If an exception occured during the copy
public static void unzip(java.util.zip.ZipFile zipFile,
java.io.File destDirectory)
throws java.lang.Exception
zipFile - The file to unzipdestDirectory - The directory to unzip the file
java.lang.Exception - If an error occurs during the unzipping process
public static void zip(java.io.File srcDirectory,
java.io.File destFile)
throws java.lang.Exception
srcDirectory - the directory to zipdestFile - the newly created zip file
java.lang.Exception
public static void zip(java.io.File srcDirectory,
java.io.File destFile,
java.lang.Boolean isArchive)
throws java.lang.Exception
srcDirectory - the directory to zipdestFile - the newly created zip fileisArchive - true if the srcDirectory is a exploded archive
java.lang.Exception - if an error occured during the zip
public static java.io.File explodeArchive(java.util.zip.ZipFile archiveFile,
java.io.File destDirectory)
throws java.lang.Exception
archiveFile - The war FiledestDirectory - The directory to explode the war
java.lang.Exception - If an error occurs when exploding the warpublic static java.lang.String getArchiveName(java.util.zip.ZipFile file)
file - The file to get the file name
public static void archive(java.io.File explodedArchive,
java.io.File destArchive)
throws java.lang.Exception
explodedArchive - the directory of the exploded archivedestArchive - the name of the new archive to create
java.lang.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 | ||||||||