Here you can find the source of fromLong(byte[] buffer, int pos, long l)
public static int fromLong(byte[] buffer, int pos, long l)
//package com.java2s; //License from project: Apache License public class Main { public static int fromLong(byte[] buffer, int pos, long l) { buffer[pos] = (byte) ((l >> 56) & 255); buffer[pos + 1] = (byte) ((l >> 48) & 255); buffer[pos + 2] = (byte) ((l >> 40) & 255); buffer[pos + 3] = (byte) ((l >> 32) & 255); buffer[pos + 4] = (byte) ((l >> 24) & 255); buffer[pos + 5] = (byte) ((l >> 16) & 255); buffer[pos + 6] = (byte) ((l >> 8) & 255); buffer[pos + 7] = (byte) (l & 255); return pos + 8; }/* w w w .j a v a 2s . c o m*/ }