public class ZipUtils extends Object
Constructor and Description |
---|
ZipUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
unZipFiles(File zipFile,
File outputFolder)
Unzips a zip file into an output folder.
|
static void |
unZipFiles(InputStream inputStream,
File outputFolder)
Unzips a zip from an input stream into an output folder.
|
static void |
zipFiles(List<File> files,
File zipFile)
Zips a collection of files to a destination zip file.
|
static void |
zipFiles(List<File> files,
OutputStream outputStream)
Zips a collection of files to a destination zip output stream.
|
public static void zipFiles(List<File> files, OutputStream outputStream) throws IOException
files
- A collection of files and directoriesoutputStream
- The output stream of the destination zip fileFileNotFoundException
IOException
public static void zipFiles(List<File> files, File zipFile) throws IOException
files
- A collection of files and directorieszipFile
- The path of the destination zip fileFileNotFoundException
IOException
public static void unZipFiles(InputStream inputStream, File outputFolder) throws IOException
inputStream
- the zip input streamoutputFolder
- the output folder where the filesIOException
public static void unZipFiles(File zipFile, File outputFolder) throws IOException
zipFile
- the zip fileoutputFolder
- the output folder where the filesIOException
Copyright © 2015 CrafterCMS. All Rights Reserved.