Package net.lingala.zip4j.model.enums
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
-
-
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 numberint
getVersionNumber()
Get the AES version number as an integerstatic AesVersion
valueOf(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.
-
-
-
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 nameNullPointerException
- 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 givenZipException
-
-