Java Utililty Methods Byte to Int

List of utility methods to do Byte to Int

Description

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

Method

intbyteToInt(byte b_)
Converts a byte to an int.
int intValue = (256 + b_) & 255;
return (intValue);
intbyteToInt(byte Byte)
byte To Int
int byte_H = (Byte >> 4) & 0x0f;
int byte_L = Byte & 0x0f;
return byte_H * 16 + byte_L;
intbyteToInt(byte myByte)
Converts byte to integer value.
return (int) myByte & 0xff;
intbyteToInt(byte value)
byte To Int
if (value < 0) {
    return value + 256;
return value;
intbyteToInt(int b)
Byte to Int converter
int i = b;
if (i < 0) {
    i = i + 256;
return i;
intbyteToInteger(final byte b)
Converts byte to integer.
return (int) b & BYTE_MAX;
IntegerbyteToInteger(final byte value)
byte To Integer
return (int) value;
StringbyteToNum(byte bByte)
byte To Num
int iRet = bByte;
System.out.println("iRet1=" + iRet);
if (iRet < 0) {
    iRet += 256;
return String.valueOf(iRet);
StringbyteToNumString(byte b)
byte To Num String
int tempB = b;
if (tempB < 0) {
    tempB = 256 + tempB;
return String.valueOf(tempB);
intbyteToOffset(int value)
byte To Offset
if (value < 0 || value > 255) {
    throw new IllegalArgumentException("Value must be between 0 and 255 inclusive");
if ((value & 0x80) == 0) {
    return value;
return -(256 - value);