Package com.reve.utils.file
Class FileUnzip
java.lang.Object
com.reve.utils.file.FileUnzip
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanunzipAllFiles(String zippedFolderPath, String unzippedFolderPath) Unzip all files of the given folder and put those unzipped files in theunzippedFolderPath.static voidUnzip the given compressed file and save them in the target file.
-
Constructor Details
-
FileUnzip
public FileUnzip()
-
-
Method Details
-
unzipAllFiles
public static boolean unzipAllFiles(String zippedFolderPath, String unzippedFolderPath) throws IOException Unzip all files of the given folder and put those unzipped files in theunzippedFolderPath. IfunzippedFolderPathdoes not exits, it will create a that folder.- Parameters:
zippedFolderPath- directory where zipped files are located. All those zipped files will be unzipped.unzippedFolderPath- all the unzipped files will be saved in this directory.- Throws:
IOException
-
unzipFile
public static void unzipFile(String compressedFilePath, String decompressedFilePath) throws IOException Unzip the given compressed file and save them in the target file.- Parameters:
compressedFilePath- absolute or relative path to the compressed filedecompressedFilePath- absolute or relative path where decompressed data will be saved.- Throws:
IOException- if any occurs while reading and writing the files
-