Here you can find the source of toInt(byte[] data)
public static int toInt(byte[] data)
//package com.java2s; //License from project: Apache License public class Main { public static int toInt(byte[] data) { if (data.length != 4) return 0; return (int) data[0] << 24 | (int) data[1] << 16 | (int) data[2] << 8 | (int) data[3]; }/*from w ww. jav a 2s . com*/ }