public class NestedJarHandler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TEMP_FILENAME_LEAF_SEPARATOR |
Constructor and Description |
---|
NestedJarHandler(InterruptionChecker interruptionChecker,
LogNode log) |
Modifier and Type | Method and Description |
---|---|
void |
close(LogNode log)
Delete temporary files and release other resources.
|
Map.Entry<File,Set<String>> |
getInnermostNestedJar(String nestedJarPath)
Get a File for a given (possibly nested) jarfile path, unzipping the first N-1 segments of an N-segment
'!'-delimited path to temporary files, then returning the File reference for the N-th temporary file.
|
Recycler<ZipFile,IOException> |
getZipFileRecycler(String canonicalPath)
Get a ZipFile recycler given the (non-nested) canonical path of a jarfile.
|
File |
unzipToTempFile(ZipFile zipFile,
ZipEntry zipEntry)
Unzip a ZipEntry to a temporary file, then return the temporary file.
|
public static final String TEMP_FILENAME_LEAF_SEPARATOR
public NestedJarHandler(InterruptionChecker interruptionChecker, LogNode log)
public Recycler<ZipFile,IOException> getZipFileRecycler(String canonicalPath) throws Exception
Exception
public Map.Entry<File,Set<String>> getInnermostNestedJar(String nestedJarPath) throws Exception
Entry<File, Set<String>>
, where the File
is the innermost jar, and the
Set<String>
is the set of all relative paths of scanning roots within the innermost jar (may
be empty, or may contain strings like "target/classes" or similar).Exception
public File unzipToTempFile(ZipFile zipFile, ZipEntry zipEntry) throws IOException
IOException
public void close(LogNode log)
Copyright © 2018. All rights reserved.