Here you can find the source of bytesToInt(byte[] bytes)
public static int bytesToInt(byte[] bytes)
//package com.java2s; public class Main { public static int bytesToInt(byte[] bytes) { return bytes[3] & 0xFF | (bytes[2] & 0xFF) << 8 | (bytes[1] & 0xFF) << 16 | (bytes[0] & 0xFF) << 24; }/* ww w . ja v a 2 s . c o m*/ }