Enum AesVersion

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<AesVersion>

    public enum AesVersion
    extends java.lang.Enum<AesVersion>
    Indicates the AES format used
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ONE
      Version 1 of the AES format
      TWO
      Version 2 of the AES format
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int versionNumber  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AesVersion​(int versionNumber)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AesVersion getFromVersionNumber​(int versionNumber)
      Get the AESVersion instance from an integer AES version number
      int getVersionNumber()
      Get the AES version number as an integer
      static AesVersion valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static AesVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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
    • Field Detail

      • versionNumber

        private int versionNumber
    • Constructor Detail

      • AesVersion

        private AesVersion​(int versionNumber)
    • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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:
        java.lang.IllegalArgumentException - if an unsupported version is given
        ZipException