|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrabbit.installer.Packer
This class packs a directory to a zipfile, for easy distribution of the RabbIT proxy.
| Field Summary | |
static boolean |
verbose
Should we run in verbose mode? |
| Constructor Summary | |
Packer()
Create a new Packer that ask for directory and zip file. |
|
Packer(java.lang.String dir,
java.lang.String file)
Create a new Packer with given directory and file. |
|
| Method Summary | |
void |
addDir(java.lang.String path,
java.io.File dir,
java.util.zip.ZipOutputStream zos)
Add a directory to a zipfile. |
void |
addFile(java.lang.String path,
java.io.File f,
java.util.zip.ZipOutputStream zos)
Add a file to a zipfile. |
void |
createZip(java.io.File dir,
java.io.File zipfile)
Create the zipfile and add the directory to it. |
static void |
main(java.lang.String[] args)
Start a new Packer. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean verbose
| Constructor Detail |
public Packer()
public Packer(java.lang.String dir,
java.lang.String file)
dir - the directory to pack.file - the name of the zip file.| Method Detail |
public static void main(java.lang.String[] args)
public void createZip(java.io.File dir,
java.io.File zipfile)
throws java.io.IOException
dir - the file of the zipfile.zipfile - the name of the zip file to create.
java.io.IOException - if creation of file fails.
public void addDir(java.lang.String path,
java.io.File dir,
java.util.zip.ZipOutputStream zos)
throws java.io.IOException
path - the path to prepend to the files in this directory.dir - the directory to add.zos - the zipstream we are writing to.
java.io.IOException - if writing to the zipfile fails.
public void addFile(java.lang.String path,
java.io.File f,
java.util.zip.ZipOutputStream zos)
throws java.io.IOException
path - the path to prepend to the filename.f - the File to add to the zip.zos - the zipstream we are writing to.
java.io.IOException - if writing to the zipfile fails.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||