Here you can find the source of byteToInteger(byte[] b)
public static int byteToInteger(byte[] b)
//package com.java2s; public class Main { public static int byteToInteger(byte[] b) { int i = 0; i += b[0] & 0xFF;//from ww w. ja v a 2 s . c o m i += b[1] << 8; i += b[2] << 16; i += b[3] << 24; return i; } }