Package com.authlete.common.types
Enum JWEZip
- java.lang.Object
-
- java.lang.Enum<JWEZip>
-
- com.authlete.common.types.JWEZip
-
- All Implemented Interfaces:
Serializable,Comparable<JWEZip>
public enum JWEZip extends Enum<JWEZip>
"zip"(Compression Algorithm) Header Parameter Values for JWE.- Since:
- 4.26
- See Also:
- RFC 7516: JSON Web Encryption (JWE), Section 4.1.3. "zip" (Compression Algorithm) Header Parameter, RFC 7518: JSON Web Algorithms (JWA), Section 7.3. JSON Web Encryption Compression Algorithms Registry, IANA: JSON Object Signing and Encryption (JOSE), JSON Web Encryption Compression Algorithms
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEF"DEF"(1); DEFLATE.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JWEZipgetByValue(short value)Find an instance of this enum by a value.StringgetName()Get the name of this algorithm.shortgetValue()Get the integer representation of this enum instance.static JWEZipparse(String alg)ConvertStringtoJWEZip.static JWEZip[]toArray(int bits)static inttoBits(EnumSet<JWEZip> set)static EnumSet<JWEZip>toSet(int bits)static EnumSet<JWEZip>toSet(JWEZip[] array)StringtoString()static JWEZipvalueOf(String name)Returns the enum constant of this type with the specified name.static JWEZip[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEF
public static final JWEZip DEF
"DEF"(1); DEFLATE.
-
-
Method Detail
-
values
public static JWEZip[] 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 (JWEZip c : JWEZip.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JWEZip 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
-
getName
public String getName()
Get the name of this algorithm. One of the values listed in the table in JSON Web Encryption Compression Algorithms.- Returns:
- The name of this algorithm.
-
getValue
public short getValue()
Get the integer representation of this enum instance.
-
getByValue
public static JWEZip getByValue(short value)
Find an instance of this enum by a value.- Parameters:
value- The integer representation of the instance to find.- Returns:
- An instance of this enum, or
nullif not found.
-
parse
public static JWEZip parse(String alg)
ConvertStringtoJWEZip.- Parameters:
alg- Algorithm name. For example,"DEF".- Returns:
JWEZipinstance, ornull.
-
toArray
public static JWEZip[] toArray(int bits)
-
-