Here you can find the source of longToByteArray(long value)
static byte[] longToByteArray(long value)
//package com.java2s; //License from project: Open Source License public class Main { static byte[] longToByteArray(long value) { return new byte[] { (byte) value, (byte) (value >> 8), (byte) (value >> 16), (byte) (value >> 24), (byte) (value >> 32), (byte) (value >> 40), (byte) (value >> 48), (byte) (value >> 56) }; }/* w w w.j a v a2s. c o m*/ }