Here you can find the source of toLong(ByteBuffer value)
public static long toLong(ByteBuffer value)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static long toLong(ByteBuffer value) { long result = 0; try {/* w w w . j av a 2 s . c o m*/ if (value != null) { int originPos = value.position(); result = value.getLong(); value.position(originPos); } } catch (Exception ex) { // ex.printStackTrace(); } return result; } }