public class ZipUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ZipUtils.ZipListener |
| Constructor and Description |
|---|
ZipUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
unzipFile(File file,
ZipUtils.ZipListener listener)
Allows to uncompress a file using a listener.
|
static boolean |
unzipFile(InputStream inputStream,
ZipUtils.ZipListener listener)
Allows to uncompress a InputStream using a listener.
|
static boolean |
zipDirectory(File directory,
OutputStream outputStream)
Allows to compress all the files within a specified directory.
|
static boolean |
zipFile(File file,
OutputStream outputStream)
Allows to compress a single file.
|
static boolean |
zipFiles(Collection files,
OutputStream outputStream)
Allows to compress files and directories.
|
public static boolean zipDirectory(File directory, OutputStream outputStream) throws IOException
directory - The directory to compress.outputStream - The OutputStream object.IOException - Any IOException.public static boolean zipFile(File file, OutputStream outputStream) throws IOException
file - The file to compress.outputStream - The OutputStream object.IOException - Any IOException.public static boolean zipFiles(Collection files, OutputStream outputStream) throws IOException
files - The list of the files to compress.outputStream - The OutputStream object.IOException - Any IOException.public static boolean unzipFile(InputStream inputStream, ZipUtils.ZipListener listener) throws IOException
inputStream - The InputStream to uncompress.listener - The ZipUtils.ZipListener object.IOException - Any IOException.public static boolean unzipFile(File file, ZipUtils.ZipListener listener) throws IOException
file - The file to unzip.listener - The ZipUtils.ZipListener object.IOException - Any IOException.Copyright © 2022 Visiativ. All rights reserved.