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

intasUnsigned(byte value)
as Unsigned
return value & 0xFF;
intasUnsigned(final byte byteValue)
Convert signed byte to unsigned int representation.
return 0xFF & byteValue;
intasUnsignedByte(byte b)
as Unsigned Byte
return b & 0xFF;
byteasUnsignedByte(int n)
as Unsigned Byte
return (byte) ((n) & 0xFF);
intasUnsignedInt(byte b)
as Unsigned Int
return asUnsignedInt(new byte[] { b });
intasUnsignedInt(byte signedValue)
Converts an unsigned 8-bit value (represented by the signed byte data type) to a 32-bit int value.
return signedValue & 0xFF;
longasUnsignedLong(byte signedValue)
Converts an unsigned 8-bit value (represented by the signed byte data type) to a 64-bit long value.
return signedValue & 0xFFL;
shortasUnsignedShort(byte signedValue)
Converts an unsigned 8-bit value (represented by the signed byte data type) to a 16-bit short value.
return (short) (signedValue & 0xFF);
intasUnsignedShort(short s)
as Unsigned Short
return s & 0xFFFF;
shortbyteToUByte(byte value)
byte To U Byte
return (short) (((short) value) & UNSIGNED_BYTE_MASK);