public class BigIntegers extends Object
Constructor and Description |
---|
BigIntegers() |
Modifier and Type | Method and Description |
---|---|
static BigInteger |
decodeUnsigned(ByteBuffer buffer,
int length)
Decode an unsigned big integer from the provided buffer.
|
static byte[] |
encodeUnsigned(BigInteger i,
int byteCount)
Encode an arbitrary big integer to its' binary representation,
without unnecessary leading zeros that are used in two's-complement form.
|
public static byte[] encodeUnsigned(BigInteger i, int byteCount)
i
- Arbitrary big integerbyteCount
- Number of bytes to use for encodingpublic static BigInteger decodeUnsigned(ByteBuffer buffer, int length)
length
- Number of bytes to read from the buffer; may include leading zerosCopyright © 2016–2021. All rights reserved.