|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jfw.file.ZipFile
public final class ZipFile
Create a zip file.
You can encypt the generated zip file if you set the encryption key
using the method setKey4Encryption(java.lang.String)
before to use the create()
method.
This is a proprietary encryption method.
Constructor Summary | |
---|---|
ZipFile(java.lang.String name)
Create an instance. |
|
ZipFile(java.lang.String path,
java.lang.String name)
Create an instance. |
Method Summary | |
---|---|
void |
addFile(java.lang.String name)
Add a file to zip. |
void |
addFile(java.lang.String name,
java.lang.String nameInZip)
Add a file to zip. |
void |
create()
Create the zip file. |
void |
encrypt(java.lang.String file2Encrypt)
Encrypt the generated zip file. |
java.lang.String |
getKey4Encryption()
Get the encryption key. |
void |
setCompressionType(int compressionType)
Set the compression method to use. |
void |
setKey4Encryption(java.lang.String key4Encryption)
Set the encryption key of the zipped files. |
java.lang.String |
toString()
Return log information relative of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ZipFile(java.lang.String name)
name
- path and name, with extension, of zip file.public ZipFile(java.lang.String path, java.lang.String name)
path
- the path of the zip file.name
- name, with extension, of zip file.Method Detail |
---|
public void setKey4Encryption(java.lang.String key4Encryption)
key4Encryption
- the encryption key.public java.lang.String getKey4Encryption()
public void setCompressionType(int compressionType)
compressionType
- public void addFile(java.lang.String name, java.lang.String nameInZip) throws JFWGenericException
name
- name of zip file.nameInZip
- the path and name of file in zip.
JFWGenericException
public void addFile(java.lang.String name) throws JFWGenericException
name
- name of zip file. This value will be used for read the file
from the file system, so an absolute path must be given.
JFWGenericException
public void create() throws JFWGenericException
JFWGenericException
public void encrypt(java.lang.String file2Encrypt) throws JFWGenericException
TMP_EXT
string.
JFWGenericException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |