public final class ASN1Integer extends ASN1Primitive
CLASS_APPLICATION, CLASS_CONTEXTSPECIFIC, CLASS_PRIVATE, CLASS_UNIVERSAL, PC_CONSTRUCTED, PC_PRIMITIVE, TAG_ANY, TAG_BITSTRING, TAG_BMPSTRING, TAG_BOOLEAN, TAG_C_BITSTRING, TAG_C_GENERALIZEDTIME, TAG_C_OCTETSTRING, TAG_C_SEQUENCE, TAG_C_SEQUENCEOF, TAG_C_SET, TAG_C_SETOF, TAG_C_UTCTIME, TAG_C_UTF8STRING, TAG_CHOICE, TAG_EMBEDDEDPDV, TAG_ENUM, TAG_EXTERNAL, TAG_GENERALIZEDTIME, TAG_GENERALSTRING, TAG_GRAPHICSTRING, TAG_IA5STRING, TAG_INSTANCEOF, TAG_INTEGER, TAG_ISO646STRING, TAG_NULL, TAG_NUMERICSTRING, TAG_OBJDESCRIPTOR, TAG_OCTETSTRING, TAG_OID, TAG_PRINTABLESTRING, TAG_REAL, TAG_RELATIVEOID, TAG_SEQUENCE, TAG_SEQUENCEOF, TAG_SET, TAG_SETOF, TAG_T61STRING, TAG_TELETEXSTRING, TAG_UNIVERSALSTRING, TAG_UTCTIME, TAG_UTF8STRING, TAG_VIDEOTEXSTRING, TAG_VISIBLESTRING| Constructor and Description |
|---|
ASN1Integer()
Constructs ASN.1 Integer type
The constructor is provided for inheritance purposes
when there is a need to create a custom ASN.1 Integer type.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
decode(BerInputStream in)
Decodes ASN.1 type.
|
void |
encodeContent(BerOutputStream out) |
static Object |
fromIntValue(int value)
Converts primitive int value to a form most suitable for encoding.
|
Object |
getDecodedObject(BerInputStream in)
Extracts array of bytes from BER input stream.
|
static ASN1Integer |
getInstance()
Returns ASN.1 Integer type default implementation
The default implementation works with encoding
that is represented as byte array in two's-complement notation.
|
void |
setEncodingContent(BerOutputStream out) |
static BigInteger |
toBigIntegerValue(Object decoded)
Converts decoded ASN.1 Integer to a BigInteger.
|
static int |
toIntValue(Object decoded)
Converts decoded ASN.1 Integer to int value.
|
checkTag, encodeASNpublic ASN1Integer()
public static ASN1Integer getInstance()
public Object decode(BerInputStream in) throws IOException
ASN1Typedecode in class ASN1TypeIOException - if an I/O error occurs or the end of the stream is reachedpublic Object getDecodedObject(BerInputStream in) throws IOException
getDecodedObject in class ASN1TypeIOExceptionpublic void encodeContent(BerOutputStream out)
encodeContent in class ASN1Typepublic void setEncodingContent(BerOutputStream out)
setEncodingContent in class ASN1Typepublic static int toIntValue(Object decoded)
decoded - a decoded object corresponding to this typepublic static BigInteger toBigIntegerValue(Object decoded)
decoded - a decoded object corresponding to this typepublic static Object fromIntValue(int value)
value - primitive value to be encoded