Enum AesVersion

java.lang.Object
java.lang.Enum<AesVersion>
net.lingala.zip4j.model.enums.AesVersion
All Implemented Interfaces:
Serializable, Comparable<AesVersion>

public enum AesVersion extends Enum<AesVersion>
Indicates the AES format used
  • Enum Constant Details

    • ONE

      public static final AesVersion ONE
      Version 1 of the AES format
    • TWO

      public static final AesVersion TWO
      Version 2 of the AES format
  • Field Details

    • versionNumber

      private int versionNumber
  • Constructor Details

    • AesVersion

      private AesVersion(int versionNumber)
  • Method Details

    • values

      public static AesVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AesVersion valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getVersionNumber

      public int getVersionNumber()
      Get the AES version number as an integer
      Returns:
      the AES version number
    • getFromVersionNumber

      public static AesVersion getFromVersionNumber(int versionNumber) throws ZipException
      Get the AESVersion instance from an integer AES version number
      Returns:
      the AESVersion instance for a given version
      Throws:
      IllegalArgumentException - if an unsupported version is given
      ZipException