Here you can find the source of intFromBytes(byte[] bytes)
public static int intFromBytes(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static int intFromBytes(byte[] bytes) { return intFromBytes(bytes[0], bytes[1], bytes[2], bytes[3]); }//from w w w .j a v a 2s . c o m public static int intFromBytes(byte a, byte b, byte c, byte d) { return a << 24 | (b & 0xFF) << 16 | (c & 0xFF) << 8 | (d & 0xFF); } }