Here you can find the source of toInt(byte[] src)
public static int toInt(byte[] src)
//package com.java2s; public class Main { public static int toInt(byte[] src, int srcPos) { int dword = 0; for (int i = 0; i < 4; i++) { dword = (dword << 8) + (src[i + srcPos] & 0xFF); }//from ww w .j ava 2s .c o m return dword; } public static int toInt(byte[] src) { return toInt(src, 0); } }