Here you can find the source of toInt(byte[] res)
public static int toInt(byte[] res)
//package com.java2s; //License from project: Apache License public class Main { public static int toInt(byte[] res) { return (res[0] & 0xff) | ((res[1] << 8) & 0xff00) | ((res[2] << 24) >>> 8) | (res[3] << 24); }/*from ww w .ja v a 2 s . c om*/ }