Enum AesVersion

    • Enum Constant Detail

      • ONE

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

        public static final AesVersion TWO
        Version 2 of the AES format
    • Method Detail

      • values

        public static AesVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AesVersion c : AesVersion.values())
            System.out.println(c);
        
        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