Here you can find the source of convertInt(byte[] data)
public static long convertInt(byte[] data)
//package com.java2s; //License from project: LGPL public class Main { public static long convertInt(byte[] data) { return convertInt(data, false); }/*from ww w . jav a2s. c o m*/ public static long convertInt(byte[] data, boolean reversed) { if (!reversed) { return ((data[3] & 0xFF) << 24) | ((data[2] & 0xFF) << 16) | ((data[1] & 0xFF) << 8) | (data[0] & 0xFF); } else { return ((data[0] & 0xFF) << 24) | ((data[1] & 0xFF) << 16) | ((data[2] & 0xFF) << 8) | (data[3] & 0xFF); } } public static long convertInt(byte[] data, int offset, boolean reversed) { byte[] target = new byte[4]; System.arraycopy(data, offset, target, 0, target.length); return convertInt(target, reversed); } public static long convertInt(byte[] data, int offset) { byte[] target = new byte[4]; System.arraycopy(data, offset, target, 0, target.length); return convertInt(target, false); } }