The list of methods to do Unsigned Byte Create are organized into topic(s).
int
toUnsignedByte(byte b) Converts the signed byte to its unsigned integer representation.
return (int) (b & 0xFF);
short
toUnsignedByte(byte b) Converts a byte to the corresponding unsigned byte value and returns the result as a short
return (short) (b & MAX_BYTE);
short
toUnsignedByte(byte value) Return the unsigned byte value [0|255] from the java byte value [-128|127].
return (short) (value - Byte.MIN_VALUE);
byte
toUnsignedByte(int value) Transforms the given integer value to an byte-value representing a number between 0 and 255.
if (value > 255 || value < 0) {
throw new IllegalArgumentException(
"Unsigned byte value range is between 0 and 255 - the value [" + value + "] is not valid.");
return (byte) value;
int[]
toUnsignedByteArray(byte[] b) to Unsigned Byte Array
int[] r = new int[b.length];
for (int i = 0; i < b.length; i++) {
r[i] = b[i] + 0x80;
return r;