Here you can find the source of unsign(byte b)
Parameter | Description |
---|---|
b | a byte value to be considered an unsigned integer |
public static int unsign(byte b)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w . j av a 2 s. c o m * Converts a signed byte to its unsigned int equivalent in the range 0-255. * * @param b a byte value to be considered an unsigned integer * * @return the unsigned version of the byte */ public static int unsign(byte b) { return b & 0xff; } }