Here you can find the source of toInt(byte[] bRefArr)
public static int toInt(byte[] bRefArr)
//package com.java2s; //License from project: Open Source License public class Main { public static int toInt(byte[] bRefArr) { int iOutcome = 0; byte bLoop; for (int i = 0, len = bRefArr.length; i < len; i++) { bLoop = bRefArr[i];/* w w w . j a v a2 s . c o m*/ iOutcome += (bLoop & 0xFF) << (8 * (len - 1 - i)); } return iOutcome; } }