|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jopendocument.util.Zip
public class Zip
Permet d'écrire dans un fichier zip.
Unzip| Constructor Summary | |
|---|---|
Zip(File f)
Construit un fichier zip. |
|
Zip(OutputStream out)
Construit un fichier zip. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected void |
closeEntry()
|
OutputStream |
createEntry(String name)
Adds a new entry to this zip file. |
static Zip |
createFrom(File from,
File to,
Set excludedEntries)
Copie de from dans to seulement les entrées dont le nom n'est pas dans excludedEntries. |
static void |
delete(File src,
Set entriesName,
File dest)
Efface les entrées spécifées de src. |
void |
zip(File newFile)
Ajoute newFile dans ce fichier. |
void |
zip(String name,
byte[] in,
boolean compressed)
|
void |
zip(String name,
InputStream in)
Zippe le contenu de in. |
void |
zipNonCompressed(String name,
byte[] in)
Zip the passed array with the ZipEntry.STORED method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Zip(File f)
throws FileNotFoundException
f - le fichier dans lequel sauver, peut ne pas exister.
FileNotFoundException - if f cannot be written to.public Zip(OutputStream out)
out - un stream dans lequel écrire.| Method Detail |
|---|
public static Zip createFrom(File from,
File to,
Set excludedEntries)
throws ZipException,
IOException
excludedEntries.
from - le zip source.excludedEntries - les noms des entrées à exclure.to - le zip de destination, s'il existe déjà les entrées de from seront ajoutées aux
existantes.
ZipException
IOException
public static void delete(File src,
Set entriesName,
File dest)
throws ZipException,
IOException
src - le zip source.entriesName - les noms des entrées à effacer.dest - le zip de destination.
ZipException
IOException
public void close()
throws IOException
IOException
public void zip(File newFile)
throws IOException
newFile - le fichier à ajouter.
IOException - si le fichier ne peut etre zippé.
public void zip(String name,
InputStream in)
throws IOException
in.
name - le nom de l'entrée.in - l'ajout.
IOException - si in ne peut etre zippé.
public void zip(String name,
byte[] in,
boolean compressed)
throws IOException
IOException
public void zipNonCompressed(String name,
byte[] in)
throws IOException
ZipEntry.STORED method. This method takes care of the
CRC and size.
name - the entry name.in - what to zip.
IOException - if an error occurs.
public OutputStream createEntry(String name)
throws IOException
name - the name of the entry.
IOException - if a pb occurs.
protected final void closeEntry()
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||