Here you can find the source of fromLong(long key)
public static byte[] fromLong(long key)
//package com.java2s; // BSD License (http://lemurproject.org/galago-license) public class Main { public static byte[] fromLong(long key) { byte[] writeBuffer = new byte[8]; writeBuffer[0] = (byte) (key >>> 56); writeBuffer[1] = (byte) (key >>> 48); writeBuffer[2] = (byte) (key >>> 40); writeBuffer[3] = (byte) (key >>> 32); writeBuffer[4] = (byte) (key >>> 24); writeBuffer[5] = (byte) (key >>> 16); writeBuffer[6] = (byte) (key >>> 8); writeBuffer[7] = (byte) (key >>> 0); return writeBuffer; }/*from www. ja v a 2 s . c o m*/ }