public final class Integers
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Integers.UintType
Use
new UintType(8) for uint8 et cetera. |
| 构造器和说明 |
|---|
Integers() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
getInt(byte[] buffer,
int i,
int len)
Retrieves an integer up to four bytes in length.
|
static long |
getLong(byte[] buffer,
int i,
int len)
Retrieves an integer up to eight bytes in length.
|
static long |
packUnsigned(long unsigned,
Integers.UintType uintType) |
static java.math.BigInteger |
toSigned(java.math.BigInteger unsigned,
Integers.UintType uintType) |
static java.math.BigInteger |
toUnsigned(java.math.BigInteger signed,
Integers.UintType uintType) |
static long |
unpackUnsigned(long signed,
Integers.UintType uintType) |
public static int getInt(byte[] buffer,
int i,
int len)
buffer - the array containing the integer's representationi - the array index locating the integerlen - the length in bytes of the integer's representationpublic static long getLong(byte[] buffer,
int i,
int len)
buffer - the array containing the integer's representationi - the array index locating the integerlen - the length in bytes of the integer's representationpublic static long packUnsigned(long unsigned,
Integers.UintType uintType)
public static long unpackUnsigned(long signed,
Integers.UintType uintType)
public static java.math.BigInteger toSigned(java.math.BigInteger unsigned,
Integers.UintType uintType)
public static java.math.BigInteger toUnsigned(java.math.BigInteger signed,
Integers.UintType uintType)