public class BigIntegers
extends java.lang.Object
| Constructor and Description |
|---|
BigIntegers() |
| Modifier and Type | Method and Description |
|---|---|
static java.math.BigInteger |
fromLittleEndianByteArray(byte[] value)
Converts the integer in the given byte array to a BigInteger.
|
static byte[] |
toLittleEndianByteArray(java.math.BigInteger value)
Gets the two's complement in little-endian order of the given integer.
|
static byte[] |
toLittleEndianByteArray(int value)
Gets the two's complement in little-endian order of the given integer.
|
static byte[] |
toLittleEndianByteArrayZeroPadded(java.math.BigInteger value,
int minByteLength)
Gets the two's complement in little-endian order of the given integer.
|
static byte[] |
toLittleEndianByteArrayZeroPadded(int value,
int minByteLength)
Gets the two's complement in little-endian order of the given integer.
|
public static byte[] toLittleEndianByteArray(java.math.BigInteger value)
value - The integer to convert.public static byte[] toLittleEndianByteArray(int value)
value - the integer to converttoLittleEndianByteArray(BigInteger)public static byte[] toLittleEndianByteArrayZeroPadded(java.math.BigInteger value,
int minByteLength)
value - The integer to convert.minByteLength - Desired length of the byte array.java.lang.IllegalArgumentException - if the length of the integer in bytes is bigger than the
given minimum length.toLittleEndianByteArray(BigInteger)public static byte[] toLittleEndianByteArrayZeroPadded(int value,
int minByteLength)
value - the integer to convertminByteLength - Desired length of the byte array.java.lang.IllegalArgumentException - if the length of the integer in bytes is bigger than the
given minimum length.toLittleEndianByteArray(BigInteger)public static java.math.BigInteger fromLittleEndianByteArray(byte[] value)
value - The byte array to convert.