public final class UnsignedByte extends Object
UnsignedByte
is a tool to convert signed byte to unsigned byte.Constructor and Description |
---|
UnsignedByte(byte b)
Constructs a UsingedByte instance by a byte.
|
UnsignedByte(int num)
Constructs a UnsignedByte instance by an integer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
byte |
getSignedValue()
Gets unsigned value as an integer.
|
int |
getUnsignedValue()
Gets unsigned value as an integer.
|
int |
hashCode() |
static String |
toHexString(byte b)
Gets hex string of a byte.
|
static int |
toInt(byte b)
Gets unsigned byte from a signed byte.
|
public UnsignedByte(int num)
num
- an integer.public UnsignedByte(byte b)
b
- A byte.public int getUnsignedValue()
public byte getSignedValue()
public static int toInt(byte b)
b
- signed byte.public static String toHexString(byte b)
b
- byteCopyright © 2015. All rights reserved.