Here you can find the source of writeLong(ByteBuffer logBuf, long l)
public static void writeLong(ByteBuffer logBuf, long l)
//package com.java2s; /*-//from w ww . jav a 2 s . c o m * See the file LICENSE for redistribution information. * * Copyright (c) 2002-2010 Oracle. All rights reserved. * */ import java.nio.ByteBuffer; public class Main { /** * Write a long into the log. */ public static void writeLong(ByteBuffer logBuf, long l) { byte b = (byte) (l >>> 0); logBuf.put(b); b = (byte) (l >>> 8); logBuf.put(b); b = (byte) (l >>> 16); logBuf.put(b); b = (byte) (l >>> 24); logBuf.put(b); b = (byte) (l >>> 32); logBuf.put(b); b = (byte) (l >>> 40); logBuf.put(b); b = (byte) (l >>> 48); logBuf.put(b); b = (byte) (l >>> 56); logBuf.put(b); } }