Class Zip4j


  • public class Zip4j
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Zip4j()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean AddFile​(java.lang.String ZipPath, java.lang.String FileToAddPath, int CompressionMethod, int CompressionLevel)
      Add a single file to a Zip file.
      boolean AddFiles​(java.lang.String ZipPath, java.util.ArrayList<java.lang.Object> FilesToAddPath, int CompressionMethod, int CompressionLevel)
      Add a List of files to a Zip file.
      boolean AddFilesToFolder​(java.lang.String ZipPath, java.lang.String ZipFolderName, java.util.ArrayList<java.lang.Object> FilesToAddPath, int CompressionMethod, int CompressionLevel)
      Add a list of files to a specific folder inside the Zip file.
      boolean AddFilesWithAESEncryption​(java.lang.String ZipPath, java.util.ArrayList<java.lang.Object> FilesToAddPath, java.lang.String Password, int CompressionMethod, int CompressionLevel, int EncryptionMethod, int AESStrength)
      Add files to Zip file with AES Encryption.
      boolean AddFileToFolder​(java.lang.String ZipPath, java.lang.String ZipFolderName, java.lang.String FileToAddPath, int CompressionMethod, int CompressionLevel)
      Add a single file to a specific folder in a Zip file.
      boolean AddFolder​(java.lang.String ZipPath, java.lang.String ZipFolderName, int CompressionMethod, int CompressionLevel)
      Add a folder (void or with content) in the given path to the Zip file.
      boolean AddStream​(java.lang.String ZipPath, java.lang.String FileNameInZip, java.io.InputStream Stream, int CompressionMethod, int CompressionLevel)
      Creates a new Entry in the Zip file and adds the content of the inputstream to it.
      boolean CreateSplitZipFile​(java.lang.String ZipPath, java.util.ArrayList<java.lang.Object> FilesToAddPath, int CompressionMethod, int CompressionLevel, int SplitLength)
      Create a split Zip file.
      boolean CreateSplitZipFileFromFolder​(java.lang.String ZipPath, java.lang.String FolderPathToCreate, int CompressionMethod, int CompressionLevel, int SplitLength)
      Create a split Zip file and add a folder to this Zip file.
      boolean CreateZip​(java.lang.String ZipPath, java.util.ArrayList<java.lang.Object> FilesToAddPath, java.lang.String Password, int CompressionMethod, int CompressionLevel, int EncryptionMethod)
      Create zip file "on the fly" with all compression and encryption being done in memory.
      boolean ExtractSingleFile​(java.lang.String ZipPath, java.lang.String FileName, java.lang.String DestFolder, java.lang.String Password)
      Extract a single file from the Zip file.
      boolean ExtractZip​(java.lang.String ZipPath, java.lang.String DestFolder, java.lang.String Password)
      Extract all files from a Zip file.
      int getBufferSize()
      Get / Set the buffer size (by default 4096 bytes).
      java.lang.String GetComment​(java.lang.String ZipPath)
      Returns the comment set for the Zip file if any.
      int GetFileCount​(java.lang.String ZipPath)
      Return the file count in a Zip file.
      int GetFolderCount​(java.lang.String ZipPath)
      Return the folder count in a Zip file.
      void Initialize​(anywheresoftware.b4a.BA ba, java.lang.String EventName)
      Initializes the Zip4j object and sets the subs that will handle the events.
      boolean IsEncryptArchive​(java.lang.String ZipPath)
      Check if the Zip file is an encrypted archive.
      boolean IsSplitArchive​(java.lang.String ZipPath)
      Check if the Zip file is a splited archive.
      boolean IsValidZipFile​(java.lang.String ZipPath)
      Checks if file is a Valid or Invalid Zip file.
      void ListAllFiles​(java.lang.String ZipPath)
      Lists on log all files in a Zip file including the properties.
      java.lang.String ListAllFilesGetString​(java.lang.String ZipPath)
      Lists all files in a Zip file including the properties and return it as string.
      boolean RemoveFile​(java.lang.String ZipPath, java.lang.String FileName)
      Remove a single file into Zip file.
      void SetAesKeyStrength​(int Strength)
      Set the current AES Key strength.
      void setBufferSize​(int Size)  
      boolean SetComment​(java.lang.String ZipPath, java.lang.String Comment)
      Sets comment for the Zip file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ENC_METHOD_ZIP_STANDARD_VARIANT_STRONG

        public final int ENC_METHOD_ZIP_STANDARD_VARIANT_STRONG
        See Also:
        Constant Field Values
      • COMP_DEFLATE

        public final int COMP_DEFLATE
      • COMP_STORE

        public final int COMP_STORE
      • COMP_AES_INTERNAL_ONLY

        public final int COMP_AES_INTERNAL_ONLY
      • DEFLATE_LEVEL_NO_COMPRESSION

        public final int DEFLATE_LEVEL_NO_COMPRESSION
      • DEFLATE_LEVEL_FASTEST

        public final int DEFLATE_LEVEL_FASTEST
      • DEFLATE_LEVEL_FASTER

        public final int DEFLATE_LEVEL_FASTER
      • DEFLATE_LEVEL_FAST

        public final int DEFLATE_LEVEL_FAST
      • DEFLATE_LEVEL_MEDIUM_FAST

        public final int DEFLATE_LEVEL_MEDIUM_FAST
      • DEFLATE_LEVEL_NORMAL

        public final int DEFLATE_LEVEL_NORMAL
      • DEFLATE_LEVEL_HIGHER

        public final int DEFLATE_LEVEL_HIGHER
      • DEFLATE_LEVEL_MAXIMUM

        public final int DEFLATE_LEVEL_MAXIMUM
      • DEFLATE_LEVEL_PRE_ULTRA

        public final int DEFLATE_LEVEL_PRE_ULTRA
      • DEFLATE_LEVEL_ULTRA

        public final int DEFLATE_LEVEL_ULTRA
    • Constructor Detail

      • Zip4j

        public Zip4j()
    • Method Detail

      • Initialize

        public void Initialize​(anywheresoftware.b4a.BA ba,
                               java.lang.String EventName)
        Initializes the Zip4j object and sets the subs that will handle the events. For convenience we show here most important library constants: Indicates the algorithm used for compression COMP_DEFLATE The Deflate compression is used. COMP_STORE No compression is performed COMP_AES_INTERNAL_ONLY For internal use in Zip4J Indicates the encryption method used in the ZIP file ENC_NO_ENCRYPTION No encryption ENC_METHOD_STANDARD Encrypted with the weak ZIP standard algorithm ENC_METHOD_ZIP_STANDARD_VARIANT_STRONG Encrypted with the stronger ZIP standard algorithm ENC_METHOD_AES Encrypted with AES, the strongest choice but currently cannot be expanded in Windows Explorer Indicates the AES encryption key length AES_KEY_STRENGTH_128 128-bit AES key length AES_KEY_STRENGTH_192 192-bit AES key length AES_KEY_STRENGTH_256 256-bit AES key length Indicates the level of compression for the DEFLATE compression method DEFLATE_LEVEL_NO_COMPRESSION Level 0 No compression DEFLATE_LEVEL_FASTEST Level 1 Deflate compression. Fastest compression. DEFLATE_LEVEL_FASTER Level 2 Deflate compression. DEFLATE_LEVEL_FAST Level 3 Deflate compression. DEFLATE_LEVEL_MEDIUM_FAST Level 4 Deflate compression. DEFLATE_LEVEL_NORMAL Level 5 Deflate compression. A compromise between speed and compression level. DEFLATE_LEVEL_HIGHER Level 6 Deflate compression. DEFLATE_LEVEL_MAXIMUM Level 7 Deflate compression. DEFLATE_LEVEL_PRE_ULTRA Level 8 Deflate compression. DEFLATE_LEVEL_ULTRA Level 9 Deflate compression. Highest compression.
      • CreateZip

        public boolean CreateZip​(java.lang.String ZipPath,
                                 java.util.ArrayList<java.lang.Object> FilesToAddPath,
                                 java.lang.String Password,
                                 int CompressionMethod,
                                 int CompressionLevel,
                                 int EncryptionMethod)
        Create zip file "on the fly" with all compression and encryption being done in memory. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FilesToAddPath: Specify a List of file Path of files to add in the Zip file (eg. "C:\MyFile.avi") for any single item in the List Password: Specify the Password for the Zip file CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) EncryptionMethod: Specify encryption method constant (eg. ENC_METHOD_STANDARD, ENC_METHOD_AES, COMP_AES_ENC) Return: True if Zip file are successfully created, else False Raise Events _Progress _Error
      • CreateSplitZipFile

        public boolean CreateSplitZipFile​(java.lang.String ZipPath,
                                          java.util.ArrayList<java.lang.Object> FilesToAddPath,
                                          int CompressionMethod,
                                          int CompressionLevel,
                                          int SplitLength)
        Create a split Zip file. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FilesToAddPath: Specify a List of file Path of files to add in the Zip file (eg. "C:\MyFile.avi") for any single item in the List CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) splitLength: Specify the split Length in bytes. SplitLenth has to be greater than 65536 bytes Please note: If the splited zip file already exists, then this method throws an exception. Return: True if Zip file are successfully created, else False Raise Events _Progress _Error
      • CreateSplitZipFileFromFolder

        public boolean CreateSplitZipFileFromFolder​(java.lang.String ZipPath,
                                                    java.lang.String FolderPathToCreate,
                                                    int CompressionMethod,
                                                    int CompressionLevel,
                                                    int SplitLength)
        Create a split Zip file and add a folder to this Zip file. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FolderPathToCreate: Specify a folder Path to create (eg. "C:\ZipTest") CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) splitLength: Specify the split Length in bytes. SplitLenth has to be greater than 65536 bytes Please note: If the splited zip file already exists, then this method throws an exception. Return: True if Zip file are successfully created, else False Raise Events _Progress _Error
      • AddStream

        public boolean AddStream​(java.lang.String ZipPath,
                                 java.lang.String FileNameInZip,
                                 java.io.InputStream Stream,
                                 int CompressionMethod,
                                 int CompressionLevel)
        Creates a new Entry in the Zip file and adds the content of the inputstream to it. This method wont work in threaded mode and will execute in the same thread, not in a different thread as most of other methods. This is a reason that _Progress Event will not be fired using this method, if you use it you need to ensure your application wait until the stream finish before the systen can access to the written file. Zip file may not necessary exist. If Zip file exist, then the InputStream will be added to it. If Zip file does not exist, then a new Zip file is created with the InputStream content. Notes: Standard zip encryption cannot be used with this functionality unless you know CRC of the stream to be added in advance. If this is the case, then this CRC has to be set in ZipParameters.setSourceFileCRC(int) before calling ZipFile.addStream() method. There are no limitations for AES encryption. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FileNameInZip: This would be the name of the file for this entry in the zip file (eg. "yourfilename.txt") Stream: Specify an InputStream to add to a Zip file CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) Return: True if successfully added to file in the Zip file, else False Raise Event _Error
      • AddFolder

        public boolean AddFolder​(java.lang.String ZipPath,
                                 java.lang.String ZipFolderName,
                                 int CompressionMethod,
                                 int CompressionLevel)
        Add a folder (void or with content) in the given path to the Zip file. Zip file may not necessary exist. If Zip file exist, then this folder will be added to it. If Zip file does not exist, then a new Zip file will be created with the folder mentioned inside it. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") ZipFolderName: Specify the name of folder to add to Zip file (eg. "C:\FolderToAdd") CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) Return: True if folder are created successfully in the Zip file, else False Raise Events _Progress _Error
      • AddFilesWithAESEncryption

        public boolean AddFilesWithAESEncryption​(java.lang.String ZipPath,
                                                 java.util.ArrayList<java.lang.Object> FilesToAddPath,
                                                 java.lang.String Password,
                                                 int CompressionMethod,
                                                 int CompressionLevel,
                                                 int EncryptionMethod,
                                                 int AESStrength)
        Add files to Zip file with AES Encryption. (Don't work with Asset Files) Zip file may not necessary exist. If Zip file exist, then these files will be added to it. If Zip file does not exist, then a new Zip file will be created with the files mentioned inside it. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip"). If Zip file does not exist, then a new Zip file is created FilesToAddPath: Specify a List of file Path of files to add in the Zip file (eg. "C:\MyFile.avi") for any single item in the List Password: Specify the Password for the Zip file CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) EncryptionMethod: Specify encryption method constant (eg. ENC_METHOD_STANDARD, ENC_METHOD_AES, COMP_AES_ENC) AESStrength: Specify AES Key strength constant (eg. AES_STRENGTH_128, AES_STRENGTH_256) Key strength 192 cannot be used for encryption. But if a zip file already has a file encrypted with key strength of 192, then it is possible decrypt this file Note: If the Zip file already exists and if this Zip file is a split file then this method throws an exception as Zip Format Specification does not allow updating split zip files. Return: True if files are successfully added to Zip file, else return False Raise Events _Progress _Error
      • AddFileToFolder

        public boolean AddFileToFolder​(java.lang.String ZipPath,
                                       java.lang.String ZipFolderName,
                                       java.lang.String FileToAddPath,
                                       int CompressionMethod,
                                       int CompressionLevel)
        Add a single file to a specific folder in a Zip file. Zip file may not necessary exist. If Zip file exist, then the file will be added to it. If Zip file does not exist, then a new Zip file is created with the file mentioned inside a specified folder. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") ZipFolderName: Specify the folder in the Zip file to which these new files will be added. (eg. "test2/" or "test2/test3/") FileToAddPath: Specify a file Path of file to add in the Zip file (eg. "C:\MyFile.avi") CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) Return: True if file is successfully added to the folder in the Zip file, else False Raise Events _Progress _Error
      • AddFilesToFolder

        public boolean AddFilesToFolder​(java.lang.String ZipPath,
                                        java.lang.String ZipFolderName,
                                        java.util.ArrayList<java.lang.Object> FilesToAddPath,
                                        int CompressionMethod,
                                        int CompressionLevel)
        Add a list of files to a specific folder inside the Zip file. Zip file may not necessary exist. If Zip file exist, then these files will be added to the zip file. If Zip file does not exist, then a new Zip file is created with the files mentioned inside a specified folder. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") ZipFolderName: Specify the folder in the Zip file to which these new files will be added. (eg. "test2/" or "test2/test3/") FilesToAddPath: Specify a List of file Path of files to add in the Zip file (eg. "C:\MyFile.avi") for any single item in the List CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) Return: True if files successfully added to the folder in the Zip file, else return False Raise Events _Progress _Error
      • AddFile

        public boolean AddFile​(java.lang.String ZipPath,
                               java.lang.String FileToAddPath,
                               int CompressionMethod,
                               int CompressionLevel)
        Add a single file to a Zip file. Zip file may not necessary exist. If Zip file exist, then this file will be added to it. If Zip file does not exist, then a new Zip file is created with the file mentioned inside it. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FileToAddPath: Specify the file Path of file to add in the Zip file (eg. "C:\MyFile.avi") CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) Note: If the Zip file already exists and if this Zip file is a split file then this method throws an exception as Zip Format Specification does not allow updating split zip files. Return: True if files are successfully added to the Zip File, else False Raise Events _Progress _Error
      • AddFiles

        public boolean AddFiles​(java.lang.String ZipPath,
                                java.util.ArrayList<java.lang.Object> FilesToAddPath,
                                int CompressionMethod,
                                int CompressionLevel)
        Add a List of files to a Zip file. Zip file may not necessary exist. If Zip file exist, then these files are added to the zip file. If Zip file does not exist, then a new Zip file is created with the files mentioned inside it. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FilesToAddPath: Specify a List of file Path of files to add in the Zip file (eg. "C:\MyFile.avi") for any single item in the List CompressionMethod: Specify compression method constant (eg. COMP_DEFLATE, COMP_STORE, COMP_AES_ENC) CompressionLevel: Specify compression level constant for Deflate compression (eg. DEFLATE_LEVEL_NORMAL, DEFLATE_LEVEL_FAST, DEFLATE_LEVEL_FASTEST, DEFLATE_LEVEL_MAXIMUM, DEFLATE_LEVEL_ULTRA) Note: If the Zip file already exists and if this Zip file is a split file then this method throws an exception as Zip Format Specification does not allow updating split zip files. Return: True if files are successfully added to the Zip File, else False Raise Events _Progress _Error
      • ExtractSingleFile

        public boolean ExtractSingleFile​(java.lang.String ZipPath,
                                         java.lang.String FileName,
                                         java.lang.String DestFolder,
                                         java.lang.String Password)
        Extract a single file from the Zip file. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FileName: Specify the File Name which has to be extracted (eg. "MyFile.avi") Note that the file name is the relative file name in the zip file. For example if the zip file contains a file "mysong.mp3" in a folder "FolderToAdd", then extraction of this file can be done as below: (eg. "FolderToAdd\mysong.mp3") DestFolder: Specify the destination folder to which this file has to be extracted (eg. "C:\DestFolder\") Password: Specify the Password for the Zip file. If file is not password protected just pass a void string "" Return: True if file extracted successfully, else False. Raise Events _Progress _Error
      • ExtractZip

        public boolean ExtractZip​(java.lang.String ZipPath,
                                  java.lang.String DestFolder,
                                  java.lang.String Password)
        Extract all files from a Zip file. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") DestFolder: Specify the destination folder to which this file has to be extracted (eg. "C:\DestFolder") Password: Specify the Password for the Zip file. If file is not password protected just pass a void string "" Return: True if files extracted successfully, else False Raise Events _Progress _Error
      • RemoveFile

        public boolean RemoveFile​(java.lang.String ZipPath,
                                  java.lang.String FileName)
        Remove a single file into Zip file. Note: If this Zip file is a split file then this method throws an exception as Zip Format Specification does not allow updating split zip files. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") FileName: Specify the File Name which has to be extracted (eg. "MyFile.avi") Return: True if file is successfully removed, else False Raise Events _Progress _Error
      • ListAllFiles

        public void ListAllFiles​(java.lang.String ZipPath)
        Lists on log all files in a Zip file including the properties. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Raise Event _Error
      • ListAllFilesGetString

        public java.lang.String ListAllFilesGetString​(java.lang.String ZipPath)
        Lists all files in a Zip file including the properties and return it as string. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Raise Event _Error
      • IsSplitArchive

        public boolean IsSplitArchive​(java.lang.String ZipPath)
        Check if the Zip file is a splited archive. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Return: True if Zip file is split archive, else False Raise Event _Error
      • IsValidZipFile

        public boolean IsValidZipFile​(java.lang.String ZipPath)
        Checks if file is a Valid or Invalid Zip file. Note: This will only check for the validity of the headers and not the validity of each entry in the zip file. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Return: True if Zip file is Valid archive, else False Raise Event _Error
      • IsEncryptArchive

        public boolean IsEncryptArchive​(java.lang.String ZipPath)
        Check if the Zip file is an encrypted archive. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Return: True if file is encrypted, else False Raise Event _Error
      • GetComment

        public java.lang.String GetComment​(java.lang.String ZipPath)
        Returns the comment set for the Zip file if any. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Return: Comment set for the Zip file if any, else a void string "" Raise Event _Error
      • SetComment

        public boolean SetComment​(java.lang.String ZipPath,
                                  java.lang.String Comment)
        Sets comment for the Zip file. ZipPath: Specify the Zip file Path (eg. "C:\DestFolder\MyZipFile.zip") Comment: Specify the comment for Zip file Return: True if comment was set, else False Raise Event _Error
      • SetAesKeyStrength

        public void SetAesKeyStrength​(int Strength)
        Set the current AES Key strength. Use library constants or just numbers 128, 192, 256. Wromg numbers will not have effect. Allowed values: AES_KEY_STRENGTH_128 AES_KEY_STRENGTH_192 AES_KEY_STRENGTH_256 By default AES_KEY_STRENGTH_256 This will be used on future operations only if AES encryption is involved.
      • GetFileCount

        public int GetFileCount​(java.lang.String ZipPath)
        Return the file count in a Zip file. ZipPath: Specify the Zip file Path eg. File.Combine(File.DirRootExternal, "MyZipFile.zip") Raise Event _Error
      • GetFolderCount

        public int GetFolderCount​(java.lang.String ZipPath)
        Return the folder count in a Zip file. ZipPath: Specify the Zip file Path eg. File.Combine(File.DirRootExternal, "MyZipFile.zip") Raise Event _Error
      • getBufferSize

        public int getBufferSize()
        Get / Set the buffer size (by default 4096 bytes).
      • setBufferSize

        public void setBufferSize​(int Size)