public class ZipExploder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
sortNames |
protected boolean |
verbose |
Constructor and Description |
---|
ZipExploder()
create a zip exploder for unpacking .jar/.zip files
|
ZipExploder(boolean verbose)
create a zip exploder for unpacking .jar/.zip files onto the file system
|
ZipExploder(boolean verbose,
boolean sorted)
create a zip exploder for unpacking .jar/.zip files onto the file system
|
Modifier and Type | Method and Description |
---|---|
protected void |
copyFileEntry(File destDir,
boolean destIsDir,
String destFileName,
InputStream dis) |
void |
copyFileEntry(File destDir,
ZipFile zf,
ZipEntry ze)
copy a single entry from the archive
|
void |
copyFileEntry(String destDir,
ZipFile zf,
ZipEntry ze)
Deprecated.
use
copyFileEntry(File, ZipFile, ZipEntry) for a
type save variant |
protected Map<String,ZipEntry> |
getEntries(ZipFile zf)
Get all the entries in a ZIP file.
|
boolean |
getSortNames() |
boolean |
getVerbose()
Get the verbose mode state.
|
static void |
main(String[] args)
Main command line entry point.
|
protected void |
print(String s) |
protected static void |
printHelp()
Print command help text.
|
void |
process(File[] zipFiles,
File[] jarFiles,
File destDir)
Explode source JAR and/or ZIP files into a target directory
|
void |
process(String[] zipNames,
String[] jarNames,
String destDir)
Deprecated.
use
process(File[], File[], File) for a type save
variant of this method |
void |
processFile(File zipFile,
File destDir)
Explode source ZIP or JAR file into a target directory
|
void |
processFile(String zipName,
String destDir)
Deprecated.
use
processFile(File, File) for a type save variant |
void |
processJars(File[] jarFiles,
File destDir)
Explode source JAR files into a target directory
|
void |
processJars(String[] jarNames,
String destDir)
Deprecated.
use
processJars(File[], File) for a type save
variant |
void |
processZips(File[] zipFiles,
File destDir)
Explode source ZIP files into a target directory
|
void |
processZips(String[] zipNames,
String destDir)
Deprecated.
use
processZips(File[], File) for a type save
variant |
protected static void |
reportError(String msg) |
void |
setSortNames(boolean sortNames) |
void |
setVerbose(boolean f)
set the verbose mode state
|
public ZipExploder()
public ZipExploder(boolean verbose)
verbose
- - set to true
for verbose modepublic ZipExploder(boolean verbose, boolean sorted)
verbose
- - set to true
for verbose modesorted
- - set to true
for sorted file modepublic boolean getVerbose()
public void setVerbose(boolean f)
f
- - verbositypublic boolean getSortNames()
public void setSortNames(boolean sortNames)
sortNames
- The sortNames to set.@Deprecated public void process(String[] zipNames, String[] jarNames, String destDir) throws IOException
process(File[], File[], File)
for a type save
variant of this methodzipNames
- names of source filesjarNames
- names of source filesdestDir
- target directory name (should already exist)IOException
- error creating a target filepublic void process(File[] zipFiles, File[] jarFiles, File destDir) throws IOException
zipFiles
- source filesjarFiles
- source filesdestDir
- target directory (should already exist)IOException
- error creating a target file@Deprecated public void processJars(String[] jarNames, String destDir) throws IOException
processJars(File[], File)
for a type save
variantjarNames
- names of source filesdestDir
- target directory name (should already exist)IOException
- error creating a target filepublic void processJars(File[] jarFiles, File destDir) throws IOException
jarFiles
- list of source filesdestDir
- target directory name (should already exist)IOException
- error creating a target file@Deprecated public void processZips(String[] zipNames, String destDir) throws IOException
processZips(File[], File)
for a type save
variantzipNames
- names of source filesdestDir
- target directory name (should already exist)IOException
- error creating a target filepublic void processZips(File[] zipFiles, File destDir) throws IOException
zipFiles
- list of source filesdestDir
- target directory name (should already exist)IOException
- error creating a target file@Deprecated public void processFile(String zipName, String destDir) throws IOException
processFile(File, File)
for a type save variantzipName
- names of source filedestDir
- target directory name (should already exist)IOException
- error creating a target filepublic void processFile(File zipFile, File destDir) throws IOException
zipFile
- source filedestDir
- target directory (should already exist)IOException
- error creating a target file@Deprecated public void copyFileEntry(String destDir, ZipFile zf, ZipEntry ze) throws IOException
copyFileEntry(File, ZipFile, ZipEntry)
for a
type save variantdestDir
- zf
- ze
- IOException
public void copyFileEntry(File destDir, ZipFile zf, ZipEntry ze) throws IOException
destDir
- zf
- ze
- IOException
protected void copyFileEntry(File destDir, boolean destIsDir, String destFileName, InputStream dis) throws IOException
IOException
protected void print(String s)
protected static void printHelp()
protected static void reportError(String msg)
public static void main(String[] args)
args
- Copyright © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.