Here you can find the source of readLong(ByteBuffer logBuf)
public static long readLong(ByteBuffer logBuf)
//package com.java2s; /*-/* ww w .j ava 2 s .co m*/ * See the file LICENSE for redistribution information. * * Copyright (c) 2002,2007 Oracle. All rights reserved. * * $Id: LogUtils.java,v 1.50.2.1 2007/02/01 14:49:47 cwl Exp $ */ import java.nio.ByteBuffer; public class Main { /** * Read a long from the log. */ public static long readLong(ByteBuffer logBuf) { long ret = (logBuf.get() & 0xFFL) << 0; ret += (logBuf.get() & 0xFFL) << 8; ret += (logBuf.get() & 0xFFL) << 16; ret += (logBuf.get() & 0xFFL) << 24; ret += (logBuf.get() & 0xFFL) << 32; ret += (logBuf.get() & 0xFFL) << 40; ret += (logBuf.get() & 0xFFL) << 48; ret += (logBuf.get() & 0xFFL) << 56; return ret; } }