Java Utililty Methods Byte to Unsigned Int

List of utility methods to do Byte to Unsigned Int

Description

The list of methods to do Byte to Unsigned Int are organized into topic(s).

Method

intbyteToUInt(byte b)
Returns the unsigned value of a byte
return b & 0xFF;
longbyteToul(byte b)
byte Toul
return b > 0 ? b : (b & 0x7F + 128);
intbyteToUnInt(Byte sByte)
da Byte a intero
int uByte = sByte.intValue();
if (uByte <= 0) {
    uByte = uByte + 256;
return uByte;
intbyteToUnsigned(byte b)
byte To Unsigned
int value = (int) b;
return (value >= 0 ? value : value + 256);
intbyteToUnsigned(byte b)
This function converts a byte into its unsigned integer form.
int unsigned = b & 0xFF;
return unsigned;
shortbyteToUnsigned(byte signed)
byte To Unsigned
if (signed >= 0) {
    return signed;
} else {
    return (short) (256 + (short) signed);
shortbyteToUnsignedByte(byte b)
byte To Unsigned Byte
return (short) (b & 0xff);
intbyteToUnsignedint(byte b)
byte To Unsignedint
int i = b;
if (i < 0) {
    i += 256;
return i;
intbyteToUnsignedInt(byte b)
Convert a byte into an unsigned integer.
return ((int) b) & 0xff;
intbyteToUnsignedInt(final byte b)
byte To Unsigned Int
return (b >= 0) ? ((int) b) : ((int) (256 + b));