Here you can find the source of toInt(byte[] value)
public static int toInt(byte[] value)
//package com.java2s; //License from project: Open Source License public class Main { public static int toInt(byte[] value) { return toInt(value, 0); }/*from ww w . j a v a2 s. c o m*/ /** * byte[] -> int * * @param value * @param offset * @return */ public static int toInt(byte[] value, int offset) { int result = 0; result = result | (value[offset + 3] & 0xff); result = result | ((((int) value[offset + 2] & 0xff)) << 8); result = result | ((((int) value[offset + 1] & 0xff)) << 16); result = result | ((((int) value[offset + 0] & 0xff)) << 24); return result; } }