Class ArchiveExtractor
java.lang.Object
com.dua3.gradle.jdkprovider.provision.ArchiveExtractor
Extracts archives supported for typical JDK packages: .zip and .tar.gz
-
Method Summary
-
Method Details
-
extract
Extracts the specified archive file into the target directory. Supports ZIP and TAR.GZ (or TGZ) formats. The method will create the target directory if it does not already exist.- Parameters:
archive- the path to the archive file to be extracted; must not be nulltargetDir- the target directory where the contents of the archive will be extracted; must not be null- Throws:
IOException- if an I/O error occurs, if the archive format is not supported, or if an extraction entry attempts to escape the target directory
-