Here you can find the source of bytesToInteger(byte[] bytes)
public static int bytesToInteger(byte[] bytes)
//package com.java2s; //License from project: Open Source License public class Main { public static int bytesToInteger(byte[] bytes) { return (bytes[0] << 24) & 0xff000000 | (bytes[1] << 16) & 0x00ff0000 | (bytes[2] << 8) & 0x0000ff00 | (bytes[3]) & 0x000000ff; }//from w w w . j a v a2 s . c om }