Package net.aifusion.asn
Class IntegerValue
java.lang.Object
net.aifusion.asn.AsnValue
net.aifusion.asn.IntegerValue
ASN.1 Integer value (<64 bits)
- Author:
- Sharad Singhal
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerValuecreate(byte[] buffer, int blen, int cursor) Create an integer value (<= 64 bits) from a serialized valuebooleanbyte[]Get the encoded value for this ASN.1 value.longgetValue()Get the value associated with this integerinthashCode()toAsnString(String prefix) Get a (semi) ASN.1 notation for this value.toString()Methods inherited from class net.aifusion.asn.AsnValue
getLength, getTag, getTagClass, getTagEncoding, getTagNumber, toHex, toHex, toHex, toHex
-
Constructor Details
-
IntegerValue
public IntegerValue(long value) ASN.1 Integer value- Parameters:
value- - value to encode- See Also:
-
-
Method Details
-
create
Create an integer value (<= 64 bits) from a serialized value- Parameters:
buffer- - input bufferblen- - length of input buffercursor- - starting location for the integer value- Returns:
- - IntegerValue
- See Also:
-
getValue
public long getValue()Get the value associated with this integer- Returns:
- - value of this integer
-
getEncodedValue
public byte[] getEncodedValue()Description copied from class:AsnValueGet the encoded value for this ASN.1 value. This method should be implemented by subclasses to provide the encoded ASN.1 value- Specified by:
getEncodedValuein classAsnValue- Returns:
- byte [] containing encoded value for this ASN.1 value (including tag, length, content)
-
equals
-
hashCode
public int hashCode() -
toString
-
toAsnString
Description copied from class:AsnValueGet a (semi) ASN.1 notation for this value.- Overrides:
toAsnStringin classAsnValue- Parameters:
prefix- - prefix to add to each line- Returns:
- - string containing the ASN.1 value
-