|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.util.jar.ZipImploder
public class ZipImploder
Field Summary | |
---|---|
protected String |
baseDir
|
protected int |
dirCount
|
protected int |
fileCount
|
protected boolean |
includeDirs
|
protected Manifest |
manifest
|
protected boolean |
verbose
|
Constructor Summary | |
---|---|
ZipImploder()
create a new imploder with no verbosity |
|
ZipImploder(boolean verbose)
create a new imploder with the specified verbosity state |
Method Summary | |
---|---|
protected void |
configure(ZipOutputStream zos,
String comment,
int method,
int level)
|
protected void |
copyFileEntry(ZipOutputStream zos,
DataInputStream dis)
|
protected void |
copyFileEntry(ZipOutputStream zos,
File f)
|
String |
getBaseDir()
|
int |
getDirCount()
|
int |
getFileCount()
|
boolean |
getIncludeDirs()
returns whether or not path information is included in .zip |
Manifest |
getManifest()
|
boolean |
getVerbose()
get the verbose mode |
static void |
main(String[] args)
Main command line entry point. |
protected void |
print(String s)
|
static void |
printHelp()
Print command help text. |
void |
process(String zipName,
String jarName,
String sourceDir)
implode source directory into .jar/.zip file |
protected void |
process(ZipOutputStream zos,
File dir)
|
void |
processDir(ZipOutputStream zos,
File dir)
|
void |
processFile(ZipOutputStream zos,
File f)
process a single file for a .zip file |
void |
processJar(String jarName,
String sourceDir)
Implode target JAR file from a source directory |
void |
processJar(String jarName,
String sourceDir,
String comment)
Implode target JAR file from a source directory |
void |
processJar(String jarName,
String sourceDir,
String comment,
int method,
int level)
Implode target JAR file from a source directory |
void |
processZip(String zipName,
String sourceDir)
Implode target JAR file from a source directory |
void |
processZip(String zipName,
String sourceDir,
String comment)
Implode target zip file from a source directory |
void |
processZip(String zipName,
String sourceDir,
String comment,
int method,
int level)
Implode target zip file from a source directory |
protected byte[] |
readAllBytes(DataInputStream is)
Read all the bytes in a stream |
protected String |
removeDrive(String path)
|
protected String |
removeLead(String path)
|
protected static void |
reportError(String msg)
|
void |
setBaseDir(String baseDir)
|
void |
setIncludeDirs(boolean includeDirs)
set whether or not path information is included in .zip files |
void |
setManifest(Manifest manifest)
|
protected String |
setup(String zipName,
String sourceDir)
|
void |
setVerbose(boolean f)
set the verbosity mode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int dirCount
protected int fileCount
protected boolean verbose
protected String baseDir
protected Manifest manifest
protected boolean includeDirs
Constructor Detail |
---|
public ZipImploder()
public ZipImploder(boolean verbose)
verbose
- - verbosity stateMethod Detail |
---|
public int getDirCount()
public int getFileCount()
public boolean getVerbose()
public void setVerbose(boolean f)
f
- verbosity statepublic String getBaseDir()
public void setBaseDir(String baseDir) throws IOException
baseDir
- The baseDir to set.
IOException
public Manifest getManifest()
public void setManifest(Manifest manifest)
manifest
- The manifest to set.public boolean getIncludeDirs()
true
if path information is included, false
otherwisepublic void setIncludeDirs(boolean includeDirs)
includeDirs
- include path inforamtion in .zip filepublic void process(String zipName, String jarName, String sourceDir) throws IOException
zipName
- name of target filejarName
- name of target filesourceDir
- source directory name
IOException
- error creating a target filepublic void processJar(String jarName, String sourceDir) throws IOException
jarName
- name of target filesourceDir
- source directory name
IOException
- error creating a target filepublic void processJar(String jarName, String sourceDir, String comment) throws IOException
jarName
- name of target filesourceDir
- source directory name (comment
-
IOException
- error creating a target filepublic void processJar(String jarName, String sourceDir, String comment, int method, int level) throws IOException
jarName
- - name of target .jarsourceDir
- - source directorycomment
- - comment for .jar filemethod
- level
-
IOException
public void processZip(String zipName, String sourceDir) throws IOException
zipName
- name of target filesourceDir
- source directory name (
IOException
- error creating a target filepublic void processZip(String zipName, String sourceDir, String comment) throws IOException
zipName
- sourceDir
- comment
-
IOException
public void processZip(String zipName, String sourceDir, String comment, int method, int level) throws IOException
zipName
- sourceDir
- comment
- method
- level
-
IOException
protected void configure(ZipOutputStream zos, String comment, int method, int level)
protected String setup(String zipName, String sourceDir) throws IOException
IOException
protected void process(ZipOutputStream zos, File dir) throws IOException
IOException
protected String removeDrive(String path)
protected String removeLead(String path)
public void processDir(ZipOutputStream zos, File dir) throws IOException
IOException
public void processFile(ZipOutputStream zos, File f) throws IOException
zos
- f
-
IOException
protected void copyFileEntry(ZipOutputStream zos, File f) throws IOException
IOException
protected void copyFileEntry(ZipOutputStream zos, DataInputStream dis) throws IOException
IOException
protected byte[] readAllBytes(DataInputStream is) throws IOException
IOException
protected void print(String s)
public 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 |