|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.zip.Zip
public class Zip
Implements the basic functionality of ZIP compression and decompression.
Field Summary | |
---|---|
static char |
BackSlash
|
static int |
BUF_SIZE
|
static char |
ForwardSlash
|
Constructor Summary | |
---|---|
Zip()
Creates a new Zip instance. |
Method Summary | |
---|---|
void |
addArchiveListener(ArchiveListener listener)
Adds listener. |
void |
compress(java.io.File file)
Creates a new ZIP archive. |
void |
compress(java.io.File file,
java.io.File targetPath)
Creates a new ZIP archive. |
void |
compress(java.io.File output,
java.util.Vector files)
Compresses list of files to specified output file. |
void |
decompress(java.io.File file)
Decompress all the files in given ZIP archive. |
void |
decompress(java.io.File file,
java.io.File output)
Decompress all the files in given ZIP archive. |
void |
removeArchiveListener(ArchiveListener listener)
Removes listener. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char ForwardSlash
public static final char BackSlash
public static final int BUF_SIZE
Constructor Detail |
---|
public Zip()
Method Detail |
---|
public void compress(java.io.File file) throws ArchiveException
compress
in interface Archive
file
- the input file
ArchiveException
- if error occurspublic void compress(java.io.File file, java.io.File targetPath) throws ArchiveException
compress
in interface Archive
file
- the input filetargetPath
- the output file or directory
ArchiveException
- if error occurspublic void compress(java.io.File output, java.util.Vector files) throws ArchiveException
output
- the ZIP output filefiles
- the file list to be compressed
ArchiveException
- if an error occurspublic void decompress(java.io.File file) throws ArchiveException
decompress
in interface Archive
file
- the ZIP file
ArchiveException
- if error occurspublic void decompress(java.io.File file, java.io.File output) throws ArchiveException
decompress
in interface Archive
file
- the ZIP fileoutput
- the output directory to decompress files to
ArchiveException
- if error occurspublic void addArchiveListener(ArchiveListener listener)
addArchiveListener
in interface Archive
listener
- the listenerArchive.addArchiveListener(ArchiveListener)
public void removeArchiveListener(ArchiveListener listener)
removeArchiveListener
in interface Archive
listener
- the listenerArchive.removeArchiveListener(ArchiveListener)
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |