Here you can find the source of byteToInt(byte[] byteArray)
public static int byteToInt(byte[] byteArray)
//package com.java2s; //License from project: Open Source License public class Main { public static int byteToInt(byte[] byteArray) { return (int) ((byteArray[0] & 0XFF) << 24) | (int) ((byteArray[1] & 0XFF) << 16) | (int) ((byteArray[2] & 0XFF) << 8) | (int) ((byteArray[3] & 0XFF)); }// w w w . j a v a 2s. com }