Java tutorial
//package com.java2s; import java.nio.ByteBuffer; public class Main { private static byte[] longToBytes(long paramLong) { ByteBuffer localByteBuffer = ByteBuffer.allocate(8); localByteBuffer.putLong(paramLong); return localByteBuffer.array(); } }