Here you can find the source of unsignedByteToInt(byte b)
Parameter | Description |
---|---|
b | the byte to be converted. |
public static final int unsignedByteToInt(byte b)
//package com.java2s; //License/*from w w w.j a va 2 s . c o m*/ public class Main { /** * Converts an unsigned byte to an integer. * * @param b the byte to be converted. * @return an integer containing the unsigned byte value. */ public static final int unsignedByteToInt(byte b) { return (int) b & 0xFF; } }