Here you can find the source of toLongs(byte[] readBuffer, int o, int l)
public static long[] toLongs(byte[] readBuffer, int o, int l)
//package com.java2s; //License from project: Open Source License public class Main { public static long[] toLongs(byte[] readBuffer, int o, int l) { long[] v = new long[l / 8]; for (int i = 0; i < v.length; i++) v[i] = toLong(readBuffer, o + i * 8); return v; }/* w w w .ja va 2 s. co m*/ public static long toLong(byte[] readBuffer, int o) { return (((long) readBuffer[0] << 56) + ((long) (readBuffer[1] & 255) << 48) + ((long) (readBuffer[2] & 255) << 40) + ((long) (readBuffer[3] & 255) << 32) + ((long) (readBuffer[4] & 255) << 24) + ((readBuffer[5] & 255) << 16) + ((readBuffer[6] & 255) << 8) + ((readBuffer[7] & 255) << 0)); } public static long toLong(byte[] readBuffer) { return toLong(readBuffer, 0); } }