Class ZipUtil


  • public class ZipUtil
    extends Object
    • Constructor Detail

      • ZipUtil

        public ZipUtil()
    • Method Detail

      • getBytesAftrZippingFolder

        public static byte[] getBytesAftrZippingFolder​(File inFolder)
      • createZipFileFromByteArrayToLocalDisk

        public static void createZipFileFromByteArrayToLocalDisk​(byte[] zippedByteData,
                                                                 File outputDir,
                                                                 String zipFileName)
      • unZipFolder

        public static void unZipFolder​(String zipFile,
                                       String outZipFileName)
      • getByteArrayFromZipFile

        public static byte[] getByteArrayFromZipFile​(File zipFileName)
      • createFileStrFromByteArrayToLocalDisk

        public static void createFileStrFromByteArrayToLocalDisk​(byte[] zippedByteData,
                                                                 File outputDir)
      • getFiles

        public static List<File> getFiles​(File file)
      • getCurrentDir

        public static File getCurrentDir()
      • setCurrentDir

        public static void setCurrentDir​(File currentDir)
      • unzip

        public static void unzip​(String zipFilePath,
                                 String destDirectory)
                          throws IOException
        Extracts a zip file specified by the zipFilePath to a directory specified by destDirectory (will be created if does not exists)
        Parameters:
        zipFilePath -
        destDirectory -
        Throws:
        IOException
      • loadFilesFromJarOrDirectly

        public static ArrayList<?> loadFilesFromJarOrDirectly​(String dirPath,
                                                              URL dirUrl)