Here you can find the source of byte2Int(byte bytes[])
public static int byte2Int(byte bytes[])
//package com.java2s; //License from project: Open Source License public class Main { public static int byte2Int(byte bytes[]) { int num = bytes[0] & 0xFF; num |= ((bytes[1] << 8) & 0xFF00); num |= ((bytes[2] << 16) & 0xFF0000); num |= ((bytes[3] << 24) & 0xFF000000); return num; }//from w ww . j a v a 2 s . c om }