|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.io.ZipExploder
public class ZipExploder
class for exploding jar/zip files onto the file system
Field Summary | |
---|---|
protected boolean |
sortNames
|
protected boolean |
verbose
|
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
protected void |
copyFileEntry(String destDir,
boolean destIsDir,
String destFile,
DataInputStream dis)
|
void |
copyFileEntry(String destDir,
ZipFile zf,
ZipEntry ze)
copy a single entry from the archive |
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(String[] zipNames,
String[] jarNames,
String destDir)
Explode source JAR and/or ZIP files into a target directory |
void |
processFile(String zipName,
String destDir)
Explode source ZIP or JAR file into a target directory |
void |
processJars(String[] jarNames,
String destDir)
Explode source JAR files into a target directory |
void |
processZips(String[] zipNames,
String destDir)
Explode source ZIP files into a target directory |
protected byte[] |
readAllBytes(DataInputStream is)
Read all the bytes in a ZIPed file |
protected static void |
reportError(String msg)
|
void |
setSortNames(boolean sortNames)
|
void |
setVerbose(boolean f)
set the verbose mode state |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean verbose
protected boolean sortNames
Constructor Detail |
---|
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 modeMethod Detail |
---|
public boolean getVerbose()
public void setVerbose(boolean f)
f
- - verbositypublic boolean getSortNames()
public void setSortNames(boolean sortNames)
sortNames
- The sortNames to set.public void process(String[] zipNames, String[] jarNames, String destDir) throws IOException
zipNames
- names of source filesjarNames
- names of source filesdestDir
- target directory name (should already exist)
IOException
- error creating a target filepublic void processJars(String[] jarNames, String destDir) throws IOException
jarNames
- names of source filesdestDir
- target directory name (should already exist)
IOException
- error creating a target filepublic void processZips(String[] zipNames, String destDir) throws IOException
zipNames
- names of source filesdestDir
- target directory name (should already exist)
IOException
- error creating a target filepublic void processFile(String zipName, String destDir) throws IOException
zipName
- names of source filedestDir
- target directory name (should already exist)
IOException
- error creating a target fileprotected Map<String,ZipEntry> getEntries(ZipFile zf)
public void copyFileEntry(String destDir, ZipFile zf, ZipEntry ze) throws IOException
destDir
- zf
- ze
-
IOException
protected void copyFileEntry(String destDir, boolean destIsDir, String destFile, DataInputStream dis) throws IOException
IOException
protected byte[] readAllBytes(DataInputStream is) 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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |