Here you can find the source of byteArrayToInt(byte[] value, int offset)
public static final int byteArrayToInt(byte[] value, int offset)
//package com.java2s; public class Main { public static final int byteArrayToInt(byte[] value, int offset) { return (int) (((int) value[0 + offset] << 24) & 0xFF000000) | (((int) value[1 + offset] << 16) & 0x00FF0000) | (((int) value[2 + offset] << 8) & 0x0000FF00) | ((int) value[3 + offset] & 0x000000FF); }//from w w w .j ava 2 s . c o m }