Here you can find the source of bytesToInt(byte[] data)
public static long bytesToInt(byte[] data)
//package com.java2s; //License from project: Open Source License public class Main { public static long bytesToInt(byte[] data) { int offset = 0; int a1 = data[offset + 3] & 0xFF; int a2 = data[offset + 2] & 0xFF; int a3 = data[offset + 1] & 0xFF; int a4 = data[offset + 0] & 0xFF; return (a1) + (a2 << 8) + (a3 << 16) + (a4 << 24); }//www .java 2 s. c o m }