Here you can find the source of bytesToInt2(byte[] arr, int offset)
public static int bytesToInt2(byte[] arr, int offset)
//package com.java2s; //License from project: Open Source License public class Main { public static int bytesToInt2(byte[] arr, int offset) { int value; value = (int) (((arr[offset] & 0xFF) << 24) | ((arr[offset + 1] & 0xFF) << 16) | ((arr[offset + 2] & 0xFF) << 8) | (arr[offset + 3] & 0xFF)); return value; }/*from w ww. j a va 2 s . c o m*/ }