Enum ASN1Type
- All Implemented Interfaces:
Serializable
,Comparable<ASN1Type>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ASN1Type
fromDERValue
(int value) The first byte in DER encoding is made of following fieldsstatic ASN1Type
static ASN1Type
fromTypeValue
(int value) byte
static ASN1Type
Returns the enum constant of this type with the specified name.static ASN1Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ANY
-
BOOLEAN
-
INTEGER
-
BIT_STRING
-
OCTET_STRING
-
NULL
-
OBJECT_IDENTIFIER
-
REAL
-
ENUMERATED
-
RELATIVE_OID
-
SEQUENCE
-
SET
-
NUMERIC_STRING
-
PRINTABLE_STRING
-
T61_STRING
-
VIDEOTEX_STRING
-
IA5_STRING
-
GRAPHIC_STRING
-
ISO646_STRING
-
GENERAL_STRING
-
UTF8_STRING
-
UNIVERSAL_STRING
-
BMP_STRING
-
UTC_TIME
-
GENERALIZED_TIME
-
-
Field Details
-
VALUES
-
typeValue
private final byte typeValue
-
-
Constructor Details
-
ASN1Type
private ASN1Type(byte typeVal)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getTypeValue
public byte getTypeValue() -
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
ASN1Type
value -null
if no match found - See Also:
-
fromTypeValue
- Parameters:
value
- The "pure" type value - with no extra bits set- Returns:
- The
ASN1Type
value -null
if no match found
-