|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.util.ZipManager
public class ZipManager
Classe contenant des méthodes statiques de gestion des fichiers zip
| Constructor Summary | |
|---|---|
ZipManager()
|
|
| Method Summary | |
|---|---|
static long |
compressFile(String filePath,
String zipFilePath)
Compress a file into a zip file. |
static long |
compressPathToZip(File folderToZip,
File zipFile)
Méthode compressant un dossier de façon récursive au format zip. |
static long |
compressPathToZip(String folderToZip,
String zipFile)
Méthode compressant un dossier de façon récursive au format zip. |
static void |
compressStreamToZip(InputStream inputStream,
String filePathNameToCreate,
String outfilename)
Méthode permettant la création et l'organisation d'un fichier zip en lui passant directement un flux d'entrée |
static void |
extract(File source,
File dest)
Extract the content of an archive into a directory. |
static int |
getNbFiles(File archive)
Indicates the number of files (not directories) inside the archive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZipManager()
| Method Detail |
|---|
public static long compressFile(String filePath,
String zipFilePath)
throws IOException
filePath - zipFilePath -
IOException
public static long compressPathToZip(String folderToZip,
String zipFile)
throws IOException
folderToZip - - dossier à compresserzipFile - - fichier zip à creer
FileNotFoundException
IOException
public static long compressPathToZip(File folderToZip,
File zipFile)
throws IOException
folderToZip - - dossier à compresserzipFile - - fichier zip à creer
FileNotFoundException
IOException
public static void compressStreamToZip(InputStream inputStream,
String filePathNameToCreate,
String outfilename)
throws IOException
inputStream - - flux de données à enregistrer dans le zipfilePathNameToCreate - - chemin et nom du fichier porté par les données du flux dans le
zipoutfilename - - chemin et nom du fichier zip à creer ou compléter
IOException
public static void extract(File source,
File dest)
throws UtilException
source - the archive.dest - the destination directory.
UtilExceptionpublic static int getNbFiles(File archive)
archive - the archive whose content is analyzed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||