Here you can find the source of toInt(byte b)
public static int toInt(byte b)
//package com.java2s; //License from project: Open Source License public class Main { public static int toInt(byte b) { return (int) b >= 0 ? b : (int) b + (int) Math.pow(2, 8); }/* w ww. jav a 2 s .c om*/ }