Here you can find the source of toUnsignedInt(byte b)
Parameter | Description |
---|---|
b | Byte to convert. |
public static int toUnsignedInt(byte b)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w ww .java2 s . c o m*/ * Convert a signed byte to an unsigned int (unsigned in the sense that only values between 0 and 255 are allowed). * * @param b Byte to convert. * @return Unsigned int representation of the signed byte. */ public static int toUnsignedInt(byte b) { return b & 0xFF; } }