@ThreadSafe public final class ExtractionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
extractFiles(File archive,
File extractTo)
Extracts the contents of an archive into the specified directory.
|
static void |
extractFiles(File archive,
File extractTo,
Engine engine)
Extracts the contents of an archive into the specified directory.
|
static void |
extractFiles(InputStream archive,
File extractTo)
Extracts the contents of an archive into the specified directory.
|
static void |
extractFilesUsingFilter(File archive,
File destination,
FilenameFilter filter)
Extracts the contents of an archive into the specified directory.
|
static void |
extractGzip(File file)
Extracts the file contained in a gzip archive.
|
static void |
extractZip(File file)
Extracts the file contained in a Zip archive.
|
public static void extractFiles(File archive, 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(File archive, 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(InputStream archive, 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(File archive, File destination, 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(File file) throws FileNotFoundException, IOException
file - the archive fileFileNotFoundException - thrown if the file does not existIOException - thrown if there is an error extracting the file.public static void extractZip(File file) throws FileNotFoundException, IOException
file - the archive fileFileNotFoundException - thrown if the file does not existIOException - thrown if there is an error extracting the file.Copyright © 2012–2020 OWASP. All rights reserved.