Here you can find the source of longToLE(long lVal)
public final static byte[] longToLE(long lVal)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; public class Main { /**//ww w. ja v a 2 s. c o m * Pack integer value to Little Endian. */ public final static byte[] longToLE(long lVal) { ByteBuffer bb = ByteBuffer.allocate(Integer.SIZE / 8); bb.order(ByteOrder.LITTLE_ENDIAN); bb.putLong(lVal); return bb.array(); } }