|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.common.util.ZipMe
Zip utility class inspired by the java tutorials of sun.
Field Summary | |
(package private) static int |
BUFFER
|
private java.io.BufferedOutputStream |
dest
|
private java.io.FileInputStream |
fis
|
private java.io.FileOutputStream |
fos
|
(package private) static Trace |
logger
|
private java.lang.String |
rootDir
|
(package private) static int |
STORE_FULL_PATH_IN_ZIP
|
(package private) static int |
STORE_NAME_ONLY_IN_ZIP
|
(package private) static int |
STORE_PATH_FROM_ZIP_ROOT
|
(package private) static int |
STORE_POLICY
|
(package private) static int |
STORE_RELATIVE_PATH_IN_ZIP
|
private boolean |
useCompression
|
private java.lang.String |
zipPath
|
private java.util.zip.ZipInputStream |
zis
|
private java.util.zip.ZipOutputStream |
zos
|
Constructor Summary | |
ZipMe()
New ZipMe object |
Method Summary | |
void |
create(java.lang.String zipname,
java.lang.String rootdir)
Create a zip file from directory |
void |
create(java.lang.String zipname,
java.lang.String rootdir,
java.lang.String putMeThere)
Same as above but the place where to put the zip file is explicit |
private void |
dirFunc(java.lang.String dirName)
|
void |
expand(java.lang.String zipname,
java.lang.String targetdir)
Expand the content of the zip file |
void |
expand(java.lang.String zipname,
java.lang.String targetdir,
java.lang.String getMeThere)
Same as below but the place where to get the zip file is explicit |
boolean |
getUseCompression()
|
long |
getZipSize()
Get the size of the zip file |
void |
setUseCompression(boolean useCompression)
|
private void |
zipFunc(java.lang.String filePath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.io.FileOutputStream fos
private java.util.zip.ZipOutputStream zos
private java.util.zip.ZipInputStream zis
private java.io.FileInputStream fis
private java.io.BufferedOutputStream dest
private java.lang.String rootDir
private java.lang.String zipPath
private boolean useCompression
static final int BUFFER
static final int STORE_FULL_PATH_IN_ZIP
static final int STORE_NAME_ONLY_IN_ZIP
static final int STORE_RELATIVE_PATH_IN_ZIP
static final int STORE_PATH_FROM_ZIP_ROOT
static final int STORE_POLICY
static Trace logger
Constructor Detail |
public ZipMe()
Method Detail |
public void create(java.lang.String zipname, java.lang.String rootdir) throws java.lang.Exception
zipname
- of the file to createrootdir
- of the directory to archive
java.lang.Exception
- if failspublic void create(java.lang.String zipname, java.lang.String rootdir, java.lang.String putMeThere) throws java.lang.Exception
zipname
- of the file to createrootdir
- of the directory to archiveputMeThere
- please
java.lang.Exception
- if failspublic void expand(java.lang.String zipname, java.lang.String targetdir, java.lang.String getMeThere) throws java.lang.Exception
zipname
- of the file to expandtargetdir
- where to place unzipped filesgetMeThere
- please
java.lang.Exception
- if failspublic long getZipSize()
public void expand(java.lang.String zipname, java.lang.String targetdir) throws java.lang.Exception
zipname
- of the file to expandtargetdir
- where to place unzipped files
java.lang.Exception
- if failsprivate void dirFunc(java.lang.String dirName) throws java.io.IOException
java.io.IOException
private void zipFunc(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public boolean getUseCompression()
public void setUseCompression(boolean useCompression)
useCompression
- The useCompression to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |