Here you can find the source of toInt(byte[] src, int srcPos)
public static int toInt(byte[] src, int srcPos)
//package com.java2s; //License from project: Open Source License 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); }/* w w w. j ava 2 s . co m*/ return dword; } public static int toInt(byte[] src) { return toInt(src, 0); } }