public final class UnsignedIntUtils
extends java.lang.Object
Constructor and Description |
---|
UnsignedIntUtils() |
Modifier and Type | Method and Description |
---|---|
static short |
toInt16(int value)
Converts value as
int16 . |
static int |
toInt32(long value)
Converts value as
int32 . |
static long |
toInt64(java.math.BigInteger value)
Converts value as
int64 . |
static byte |
toInt8(int value)
Converts value to
int8 . |
static int |
toUint16(short value)
Converts value to
uint16 . |
static long |
toUint32(int value)
Converts value to
uint32 . |
static java.math.BigInteger |
toUint64(long value)
Converts value to
uint64 . |
static short |
toUint8(byte value)
Converts value to
uint8 . |
public static byte toInt8(int value) throws java.lang.IllegalArgumentException
int8
.java.lang.IllegalArgumentException
- if value is either negative or too large to fit
into uint8
.public static short toInt16(int value) throws java.lang.IllegalArgumentException
int16
.java.lang.IllegalArgumentException
- if value is either negative or too large to fit
into uint16
.public static int toInt32(long value) throws java.lang.IllegalArgumentException
int32
.java.lang.IllegalArgumentException
- if value is either negative or too large to fit
into uint32
.public static long toInt64(java.math.BigInteger value) throws java.lang.IllegalArgumentException
int64
.java.lang.IllegalArgumentException
- if value is either negative or too large to fit
into uint64
.public static short toUint8(byte value)
uint8
.public static int toUint16(short value)
uint16
.public static long toUint32(int value)
uint32
.public static java.math.BigInteger toUint64(long value)
uint64
.