Modifier and Type | Field and Description |
---|---|
static BigInteger |
UNSIGNED_LONG_MAX_VALUE
Max value of an unsigned long:
2^64 - 1 . |
Modifier and Type | Method and Description |
---|---|
static short |
toSigned(byte unsigned)
Returns the value of the specified unsigned
byte as a signed
short . |
static BigInteger |
toSigned(byte[] unsigned)
Returns the value of the specified
byte array representing an
unsigned value as a signed BigInteger . |
static long |
toSigned(int unsigned)
Returns the value of the specified unsigned
int as a signed
long . |
static BigInteger |
toSigned(long unsigned)
Returns the value of the specified unsigned
long as a signed
BigInteger . |
static int |
toSigned(short unsigned)
Returns the value of the specified unsigned
short as a signed
int . |
static byte[] |
toUnsigned(BigInteger signed)
Returns the unsigned representation of the signed value as a
byte
array. |
static byte |
toUnsigned(byte signed)
Returns the unsigned representation of the signed value.
|
static int |
toUnsigned(int signed)
Returns the unsigned representation of the signed value.
|
static long |
toUnsigned(long signed)
Returns the unsigned representation of the signed value.
|
static short |
toUnsigned(short signed)
Returns the unsigned representation of the signed value.
|
public static final BigInteger UNSIGNED_LONG_MAX_VALUE
2^64 - 1
.public static short toSigned(byte unsigned)
byte
as a signed
short
.unsigned
- The unsigned byte
.byte
as a signed
short
.public static int toSigned(short unsigned)
short
as a signed
int
.unsigned
- The unsigned short
.short
as a signed
int
.public static long toSigned(int unsigned)
int
as a signed
long
.unsigned
- The unsigned int
.int
as a signed
long
.public static BigInteger toSigned(long unsigned)
long
as a signed
BigInteger
.unsigned
- The unsigned long
.long
as a signed
BigInteger
.public static BigInteger toSigned(byte[] unsigned)
byte
array representing an
unsigned value as a signed BigInteger
.unsigned
- The byte
array representing an unsigned value.byte
array representing an
unsigned value as a signed BigInteger
.public static byte toUnsigned(byte signed)
0
.signed
- The signed value.IllegalArgumentException
- If signed < 0
.public static short toUnsigned(short signed)
0
.signed
- The signed value.IllegalArgumentException
- If signed < 0
.public static int toUnsigned(int signed)
0
.signed
- The signed value.IllegalArgumentException
- If signed < 0
.public static long toUnsigned(long signed)
0
.signed
- The signed value.IllegalArgumentException
- If signed < 0
.public static byte[] toUnsigned(BigInteger signed)
byte
array. The signed value cannot be less than 0
.signed
- The signed value.byte
array.IllegalArgumentException
- If signed < 0
.Copyright © 2020 LibJ. All rights reserved.