Here you can find the source of bytesToInt(byte[] b)
public static int bytesToInt(byte[] b)
//package com.java2s; public class Main { public static int bytesToInt(byte[] b) { int n = (int) ((((b[3] & 0xff) << 24) | ((b[2] & 0xff) << 16) | ((b[1] & 0xff) << 8) | ((b[0] & 0xff) << 0))); return n; }/*from www .j a v a 2 s . c om*/ }