|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.asn1.AbstractDERType
org.ldaptive.asn1.IntegerType
public class IntegerType
Converts arbitrary-precision integers to and from their DER encoded format.
| Constructor Summary | |
|---|---|
IntegerType(BigInteger item)
Creates a new integer type. |
|
IntegerType(DERTag tag,
BigInteger item)
Creates a new integer type. |
|
IntegerType(DERTag tag,
int item)
Creates a new integer type. |
|
IntegerType(int item)
Creates a new integer type. |
|
| Method Summary | |
|---|---|
static BigInteger |
decode(ByteBuffer encoded)
Converts bytes in the buffer to an integer by reading from the current position to the limit, which assumes the bytes of the integer are in big-endian order. |
static BigInteger |
decodeUnsigned(ByteBuffer encoded)
Converts bytes in the buffer to an unsigned integer by reading from the current position to the limit, which assumes the bytes of the integer are in big-endian order. |
byte[] |
encode()
Encode this object into it's DER type. |
static byte[] |
toBytes(BigInteger i)
Converts the supplied big integer to a byte array. |
| Methods inherited from class org.ldaptive.asn1.AbstractDERType |
|---|
encode, readBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntegerType(BigInteger item)
item - to DER encodepublic IntegerType(int item)
item - to DER encode
public IntegerType(DERTag tag,
BigInteger item)
tag - der tag associated with this typeitem - to DER encode
IllegalArgumentException - if the der tag is constructed
public IntegerType(DERTag tag,
int item)
tag - der tag associated with this typeitem - to DER encode
IllegalArgumentException - if the der tag is constructed| Method Detail |
|---|
public byte[] encode()
encode in interface DEREncoderpublic static BigInteger decode(ByteBuffer encoded)
encoded - buffer containing DER-encoded data where the buffer is
positioned at the start of integer bytes and the limit is set beyond the
last byte of integer data.
public static BigInteger decodeUnsigned(ByteBuffer encoded)
encoded - buffer containing DER-encoded data where the buffer is
positioned at the start of integer bytes and the limit is set beyond the
last byte of integer data.
public static byte[] toBytes(BigInteger i)
i - to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||