Here you can find the source of toLong(byte[] readBuffer, int o)
public static long toLong(byte[] readBuffer, int o)
//package com.java2s; //License from project: Open Source License public class Main { 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)); }//from w w w.j av a 2 s. c o m public static long toLong(byte[] readBuffer) { return toLong(readBuffer, 0); } }