Here you can find the source of unsigned32ToInt(byte[] bytes)
public static long unsigned32ToInt(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static long unsigned32ToInt(byte[] bytes) { return fromBytes(bytes, 4); }//www .java 2 s.c om public static long fromBytes(byte[] bytes, int len) { long v = 0; for (int i = 0; i < len; i++) { v += (long) (bytes[i] & 255) << (len - i - 1) * 8; } return v; } }