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