Package adalid.util.setup
Class ZipUtils
java.lang.Object
adalid.util.setup.ZipUtils
Zip and unzip files using Java core libraries.
Based on Zipping and Unzipping in Java (https://www.baeldung.com/java-compress-and-uncompress) by baeldung
- Author:
- Jorge Campins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]deflate(byte[] inputBytes) static byte[]static byte[]inflate(byte[] inputBytes) static StringinflateToString(byte[] inputBytes) static booleanstatic booleanstatic booleanstatic booleanstatic booleanzipFileAndFolder(String filePathName) static booleanzipFileAndFolder(String filePathName, String folderPathName) static booleanzipFileAndFolder(String filePathName, String folderPathName, boolean siblings) static boolean
-
Constructor Details
-
ZipUtils
public ZipUtils()
-
-
Method Details
-
deflate
- Throws:
IOException
-
deflate
- Throws:
IOException
-
inflateToString
- Throws:
DataFormatExceptionIOException
-
inflate
- Throws:
DataFormatExceptionIOException
-
zipFile
- Throws:
IOException
-
zipFolder
- Throws:
IOException
-
zipFileAndFolder
- Throws:
IOException
-
zipFileAndFolder
public static boolean zipFileAndFolder(String filePathName, String folderPathName) throws IOException - Throws:
IOException
-
zipFileAndFolder
public static boolean zipFileAndFolder(String filePathName, String folderPathName, boolean siblings) throws IOException - Throws:
IOException
-
zip
- Throws:
IOException
-
unzip
- Throws:
IOException
-
unzip
- Throws:
IOException
-