Here you can find the source of longToNetworkBytes(long value)
public static byte[] longToNetworkBytes(long value)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] longToNetworkBytes(long value) { // TODO: rename me return new byte[] { (byte) (value >>> 56), (byte) (value >>> 48), (byte) (value >>> 40), (byte) (value >>> 32), (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value, }; }// www . j av a2s. c o m }