Enum Class ASN1Class
- All Implemented Interfaces:
Serializable
,Comparable<ASN1Class>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ASN1Class
fromDERValue
(int value) The first byte in DER encoding is made of following fieldsstatic ASN1Class
static ASN1Class
fromTypeValue
(int value) byte
static ASN1Class
Returns the enum constant of this class with the specified name.static ASN1Class[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNIVERSAL
-
APPLICATION
-
CONTEXT
-
PRIVATE
-
-
Field Details
-
VALUES
-
byteValue
private final byte byteValue
-
-
Constructor Details
-
ASN1Class
private ASN1Class(byte classValue)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getClassValue
public byte getClassValue() -
fromName
-
fromDERValue
The first byte in DER encoding is made of following fields
------------------------------------------------- |Bit 8|Bit 7|Bit 6|Bit 5|Bit 4|Bit 3|Bit 2|Bit 1| ------------------------------------------------- | Class | CF | Type | -------------------------------------------------
- Parameters:
value
- The original DER encoded byte- Returns:
- The
ASN1Class
value -null
if no match found - See Also:
-
fromTypeValue
- Parameters:
value
- The "pure" value - unshifted and with no extras- Returns:
- The
ASN1Class
value -null
if no match found
-