Here you can find the source of bytesToInt(final byte[] b)
public static int bytesToInt(final byte[] b)
//package com.java2s; public class Main { public static int bytesToInt(final byte[] b) { return b[3] & 0xFF | (b[2] & 0xFF) << 8 | (b[1] & 0xFF) << 16 | (b[0] & 0xFF) << 24; }/*from w w w . j a va 2 s. com*/ }