Here you can find the source of longToBytesLE(long value, byte[] buffer)
public static void longToBytesLE(long value, byte[] buffer)
//package com.java2s; //License from project: Open Source License public class Main { public static void longToBytesLE(long value, byte[] buffer) { longToBytesLE(value, buffer, 0, buffer.length); }/*from w ww . j a va 2s . c o m*/ public static void longToBytesLE(long value, byte[] buffer, int offset, int length) { int endOffset = offset + length; for (int i = offset; i < endOffset; ++i) { buffer[i] = (byte) value; value >>>= 8; } } }