Here you can find the source of setBytesFromLong(byte[] ret, long value, int offs)
final static void setBytesFromLong(byte[] ret, long value, int offs)
//package com.java2s; public class Main { final static void setBytesFromLong(byte[] ret, long value, int offs) { long v = value; int j = offs; ret[j++] = (byte) ((v >>> 56) & 0xFF); ret[j++] = (byte) ((v >>> 48) & 0xFF); ret[j++] = (byte) ((v >>> 40) & 0xFF); ret[j++] = (byte) ((v >>> 32) & 0xFF); ret[j++] = (byte) ((v >>> 24) & 0xFF); ret[j++] = (byte) ((v >>> 16) & 0xFF); ret[j++] = (byte) ((v >>> 8) & 0xFF); ret[j++] = (byte) ((v >>> 0) & 0xFF); }//from w w w.ja va 2 s .c o m }