Package adalid.util.setup
Class ZipUtils
- java.lang.Object
-
- adalid.util.setup.ZipUtils
-
public class ZipUtils extends Object
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 Constructor Description ZipUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanunzip(String zipPathName)static booleanunzip(String zipPathName, String dirPathName)static booleanzip(String zipPathName, String... pathNames)static booleanzipFile(String pathName)static booleanzipFileAndFolder(String filePathName)static booleanzipFileAndFolder(String filePathName, String folderPathName)static booleanzipFileAndFolder(String filePathName, String folderPathName, boolean siblings)static booleanzipFolder(String pathName)
-
-
-
Method Detail
-
zipFile
public static boolean zipFile(String pathName) throws IOException
- Throws:
IOException
-
zipFolder
public static boolean zipFolder(String pathName) throws IOException
- Throws:
IOException
-
zipFileAndFolder
public static boolean zipFileAndFolder(String filePathName) throws IOException
- 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
public static boolean zip(String zipPathName, String... pathNames) throws IOException
- Throws:
IOException
-
unzip
public static boolean unzip(String zipPathName) throws IOException
- Throws:
IOException
-
unzip
public static boolean unzip(String zipPathName, String dirPathName) throws IOException
- Throws:
IOException
-
-