Here you can find the source of toLong(ByteBuffer bytes)
public static long toLong(ByteBuffer bytes)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { public static long toLong(ByteBuffer bytes) { return bytes.getLong(bytes.position()); }//w w w . ja v a2 s .c o m }