Java Byte to Unsigned Int byteToUnsignedint(byte b)

Here you can find the source of byteToUnsignedint(byte b)

Description

byte To Unsignedint

License

Open Source License

Declaration

public static int byteToUnsignedint(byte b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int byteToUnsignedint(byte b) {
        int i = b;
        if (i < 0) {
            i += 256;/*from  www .  j a  v a  2 s. c o m*/
        }
        return i;
    }
}

Related

  1. byteToUnsigned(byte b)
  2. byteToUnsigned(byte b)
  3. byteToUnsigned(byte signed)
  4. byteToUnsignedByte(byte b)
  5. byteToUnsignedInt(byte b)
  6. byteToUnsignedInt(final byte b)
  7. byteToUnsignedLong(byte data)