|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bibalex.daf.handlers.compressionhandler.Zipper
public class Zipper
This class is responsible for zipping files anf folders.
| Field Summary | |
|---|---|
(package private) static int |
BUFFER
Static int holds the buffer size. |
| Constructor Summary | |
|---|---|
Zipper()
|
|
| Method Summary | |
|---|---|
void |
ZipFile(java.lang.String fileName,
java.lang.String zipFileName)
Zips a given file into the target Zip file. |
void |
ZipFolder(java.lang.String folderName,
java.lang.String zipFileName,
boolean recursive)
Zips a given folder into the target Zip file. |
private java.util.zip.ZipOutputStream |
ZipSubFolder(java.util.zip.ZipOutputStream zipOutputStream,
java.lang.String folderName,
java.lang.String subFolderName,
boolean recursive)
Private recusive method for Zipping subfolders. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final int BUFFER
| Constructor Detail |
|---|
public Zipper()
| Method Detail |
|---|
public void ZipFile(java.lang.String fileName,
java.lang.String zipFileName)
throws ZipperException
fileName - fileName/Path to ZipzipFileName - the name of the resulting Zip File.
ZipperException - An exception explaning the reason of Zipping failure.ZipperException
public void ZipFolder(java.lang.String folderName,
java.lang.String zipFileName,
boolean recursive)
throws ZipperException
folderName - folderName/Path to ZipzipFileName - the name of the resulting Zip File.recursive - Boolean to indicate wether to Zip only the first level or all levels recursively.
ZipperException - An exception explaning the reason of Zipping failure.ZipperException
private java.util.zip.ZipOutputStream ZipSubFolder(java.util.zip.ZipOutputStream zipOutputStream,
java.lang.String folderName,
java.lang.String subFolderName,
boolean recursive)
throws java.io.IOException
zipOutputStream - the Output stream to write to.folderName - the input subfolder.subFolderName - the sub-folder relative path from within the folder.recursive - indicates wether recusive or not.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||