Here you can find the source of LongToBytes8(long l)
public static byte[] LongToBytes8(long l)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] LongToBytes8(long l) { byte abyte0[] = new byte[8]; abyte0[7] = (byte) (int) (255L & l); abyte0[6] = (byte) (int) ((65280L & l) >> 8); abyte0[5] = (byte) (int) ((0xff0000L & l) >> 16); abyte0[4] = (byte) (int) ((0xff000000L & l) >> 24); abyte0[3] = (byte) (int) ((0xff00000000L & l) >> 32); abyte0[2] = (byte) (int) ((0xff0000000000L & l) >> 40); abyte0[1] = (byte) (int) ((0xff000000000000L & l) >> 48); abyte0[0] = (byte) (int) ((0xff00000000000000L & l) >> 56); return abyte0; }//w w w. ja va2 s .c om }