Here you can find the source of ulong2bytes(long value)
public static byte[] ulong2bytes(long value)
//package com.java2s; public class Main { public static byte[] ulong2bytes(long value) { byte[] resultByte = { (byte) ((value >>> 24) & 0xFFFFFFFF), (byte) ((value >>> 16) & 0x00FFFFFF), (byte) ((value >>> 8) & 0x0000FFFF), (byte) (value & 0x000000FF) }; return resultByte; }/*w w w.j a v a2s .c o m*/ }