@ThreadSafe
public final class ExtractionUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
extractFiles(java.io.File archive,
java.io.File extractTo)
Extracts the contents of an archive into the specified directory.
|
static void |
extractFiles(java.io.File archive,
java.io.File extractTo,
Engine engine)
Extracts the contents of an archive into the specified directory.
|
static void |
extractFiles(java.io.InputStream archive,
java.io.File extractTo)
Extracts the contents of an archive into the specified directory.
|
static void |
extractFilesUsingFilter(java.io.File archive,
java.io.File destination,
java.io.FilenameFilter filter)
Extracts the contents of an archive into the specified directory.
|
static void |
extractGzip(java.io.File file)
Extracts the file contained in a gzip archive.
|
static void |
extractZip(java.io.File file)
Extracts the file contained in a Zip archive.
|
public static void extractFiles(java.io.File archive,
java.io.File extractTo)
throws ExtractionException
archive - an archive file such as a WAR or EARextractTo - a directory to extract the contents toExtractionException - thrown if an exception occurs while
extracting the filespublic static void extractFiles(java.io.File archive,
java.io.File extractTo,
Engine engine)
throws ExtractionException
archive - an archive file such as a WAR or EARextractTo - a directory to extract the contents toengine - the scanning engineExtractionException - thrown if there is an error extracting the
filespublic static void extractFiles(java.io.InputStream archive,
java.io.File extractTo)
throws ExtractionException
archive - an archive file such as a WAR or EARextractTo - a directory to extract the contents toExtractionException - thrown if there is an error extracting the
filespublic static void extractFilesUsingFilter(java.io.File archive,
java.io.File destination,
java.io.FilenameFilter filter)
throws ExtractionException
archive - an archive file such as a WAR or EARdestination - a directory to extract the contents tofilter - determines which files get extractedExtractionException - thrown if the archive is not foundpublic static void extractGzip(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
file - the archive filejava.io.FileNotFoundException - thrown if the file does not existjava.io.IOException - thrown if there is an error extracting the file.public static void extractZip(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
file - the archive filejava.io.FileNotFoundException - thrown if the file does not existjava.io.IOException - thrown if there is an error extracting the file.Copyright© 2012-21 Jeremy Long. All Rights Reserved.