Java tutorial
//package com.java2s; import java.math.BigInteger; public class Main { public static int bytesToInt(byte[] bytes) { return new BigInteger(bytes).intValue(); } }