Here you can find the source of bytesToInt(byte[] value)
public static int bytesToInt(byte[] value)
//package com.java2s; //License from project: Apache License public class Main { public static int bytesToInt(byte[] value) { int iOutcome = 0; byte bLoop; for (int i = 0; i < value.length; i++) { bLoop = value[i];//from w ww .j a v a 2 s . c om iOutcome += (bLoop & 0xFF) << (8 * i); } return iOutcome; } }