Here you can find the source of toUnsignedByte(byte b)
Parameter | Description |
---|---|
b | the byte to convert |
public static int toUnsignedByte(byte b)
//package com.java2s; //License from project: LGPL public class Main { /**//from w w w . ja v a 2 s .c o m * Converts the signed byte to its unsigned integer representation. * @param b the byte to convert * @return the corresponding unsigned integer in range 0 - 255 */ public static int toUnsignedByte(byte b) { return (int) (b & 0xFF); } }