Here you can find the source of byteToInt(byte value)
public static int byteToInt(byte value)
//package com.java2s; //License from project: Apache License public class Main { public static int byteToInt(byte value) { if (value < 0) { return value + 256; }//from w w w . j a va 2s .co m return value; } }