Here you can find the source of toInt(byte[] data)
public static int toInt(byte[] data)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static int toInt(byte[] data) { return ByteBuffer.wrap(data).getInt(); }// ww w .ja v a2 s . c o m }