public class DEREnumerated extends ASN1Primitive
Modifier and Type | Field and Description |
---|---|
(package private) byte[] |
bytes |
private static ASN1Enumerated[] |
cache |
Constructor and Description |
---|
DEREnumerated(java.math.BigInteger value) |
DEREnumerated(byte[] bytes) |
DEREnumerated(int value) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
asn1Equals(ASN1Primitive o) |
(package private) void |
encode(ASN1OutputStream out) |
(package private) int |
encodedLength() |
(package private) static ASN1Enumerated |
fromOctetString(byte[] enc) |
static DEREnumerated |
getInstance(ASN1TaggedObject obj,
boolean explicit)
return an Enumerated from a tagged object.
|
static ASN1Enumerated |
getInstance(java.lang.Object obj)
return an integer from the passed in object
|
java.math.BigInteger |
getValue() |
int |
hashCode() |
(package private) boolean |
isConstructed() |
equals, fromByteArray, toASN1Primitive, toDERObject, toDLObject
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
byte[] bytes
private static ASN1Enumerated[] cache
public DEREnumerated(int value)
public DEREnumerated(java.math.BigInteger value)
public DEREnumerated(byte[] bytes)
public static ASN1Enumerated getInstance(java.lang.Object obj)
java.lang.IllegalArgumentException
- if the object cannot be converted.public static DEREnumerated getInstance(ASN1TaggedObject obj, boolean explicit)
obj
- the tagged object holding the object we wantexplicit
- true if the object is meant to be explicitly
tagged false otherwise.java.lang.IllegalArgumentException
- if the tagged object cannot
be converted.public java.math.BigInteger getValue()
boolean isConstructed()
isConstructed
in class ASN1Primitive
int encodedLength()
encodedLength
in class ASN1Primitive
void encode(ASN1OutputStream out) throws java.io.IOException
encode
in class ASN1Primitive
java.io.IOException
boolean asn1Equals(ASN1Primitive o)
asn1Equals
in class ASN1Primitive
public int hashCode()
hashCode
in class ASN1Primitive
static ASN1Enumerated fromOctetString(byte[] enc)