Here you can find the source of toInt(byte[] b)
public static int toInt(byte[] b)
//package com.java2s; //License from project: Apache License public class Main { public static int toInt(byte[] b) { return toInt(b, 0); }// w w w. ja va2 s . c o m public static int toInt(byte[] b, int off) { return ((b[off + 3] & 0xFF) << 0) + ((b[off + 2] & 0xFF) << 8) + ((b[off + 1] & 0xFF) << 0x10) + ((b[off + 0] & 0xFF) << 0x18); } }