Java Utililty Methods Unsigned Number Create

List of utility methods to do Unsigned Number Create

Description

The list of methods to do Unsigned Number Create are organized into topic(s).

Method

intunsign(byte b)
Converts a signed byte to its unsigned int equivalent in the range 0-255.
return b & 0xff;
shortunsign(byte b)
unsign
return (short) (b & 0xFF);
intunsign(byte b)
unsign
return b & 0xff;
intunsign(byte by)
unsign
return by & 0xFF;
intunsign(byte i)
Convert an unsigned byte to an int.
return i & MASK_BYTE_UNSIGN;
int[]unsign(byte[] b)
unsign
int[] v = new int[b.length];
for (int i = 0; i < b.length; i++) {
    v[i] = unsign(b[i]);
return v;
intunsign(final byte b)
unsign
int val = b;
if (val < 0) {
    val *= -1;
    val = (128 - val) + 128;
return val;
shortunsigned(byte b)
unsigned
return (short) (b < 0 ? b & 0xFF : b);
shortunsigned(byte data)
Convert a signed byte into an unsigned short value.
return (short) (data & 0xFF);
shortunsigned(byte value)
unsigned
return (short) (value & 0xFF);