public class ASN1Object
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
private boolean |
constructed |
static byte |
CONSTRUCTED |
private int |
length |
private ASN1Class |
objClass |
private ASN1Type |
objType |
private static long |
serialVersionUID |
private byte[] |
value |
Constructor and Description |
---|
ASN1Object() |
ASN1Object(ASN1Class c,
ASN1Type t,
boolean ctored,
int len,
byte... data) |
ASN1Object(byte tag,
int len,
byte... data) |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
asInteger()
Get the value as
BigInteger |
java.lang.Object |
asObject() |
java.util.List<java.lang.Integer> |
asOID() |
java.lang.String |
asString()
Get value as string.
|
ASN1Object |
clone() |
DERParser |
createParser() |
boolean |
equals(java.lang.Object obj) |
int |
getLength() |
ASN1Class |
getObjClass() |
ASN1Type |
getObjType() |
byte[] |
getPureValueBytes() |
byte[] |
getValue() |
int |
hashCode() |
boolean |
isConstructed() |
void |
setConstructed(boolean c) |
void |
setLength(int l) |
void |
setObjClass(ASN1Class c) |
void |
setObjType(ASN1Type y) |
void |
setValue(byte[] v) |
java.math.BigInteger |
toInteger() |
java.util.List<java.lang.Integer> |
toOID() |
java.lang.String |
toString() |
public static final byte CONSTRUCTED
private static final long serialVersionUID
private ASN1Class objClass
private ASN1Type objType
private boolean constructed
private int length
private byte[] value
public ASN1Object()
public ASN1Object(byte tag, int len, byte... data)
public ASN1Class getObjClass()
public void setObjClass(ASN1Class c)
public ASN1Type getObjType()
public void setObjType(ASN1Type y)
public boolean isConstructed()
public void setConstructed(boolean c)
public int getLength()
public void setLength(int l)
public byte[] getValue()
public byte[] getPureValueBytes()
public void setValue(byte[] v)
public DERParser createParser()
public java.lang.Object asObject() throws java.io.IOException
java.io.IOException
public java.math.BigInteger asInteger() throws java.io.IOException
BigInteger
java.io.IOException
- if type not an ASN1Type.INTEGER
public java.math.BigInteger toInteger()
public java.lang.String asString() throws java.io.IOException
java.io.IOException
- ifpublic java.util.List<java.lang.Integer> asOID() throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.Integer> toOID() throws java.io.IOException
java.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public ASN1Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object