Here you can find the source of fromLong(long v, int offset, byte[] dest)
public static void fromLong(long v, int offset, byte[] dest)
//package com.java2s; /**//from ww w. j av a 2 s. c o m * Copyright 2012-2013 Johns Hopkins University HLTCOE. All rights reserved. * This software is released under the 2-clause BSD license. * See LICENSE in the project root directory. */ public class Main { public static void fromLong(long v, int offset, byte[] dest) { assert (dest.length >= (8 + offset)); dest[0 + offset] = (byte) ((v >> 56) & 0xff); dest[1 + offset] = (byte) ((v >> 48) & 0xff); dest[2 + offset] = (byte) ((v >> 40) & 0xff); dest[3 + offset] = (byte) ((v >> 32) & 0xff); dest[4 + offset] = (byte) ((v >> 24) & 0xff); dest[5 + offset] = (byte) ((v >> 16) & 0xff); dest[6 + offset] = (byte) ((v >> 8) & 0xff); dest[7 + offset] = (byte) ((v >> 0) & 0xff); } }