Here you can find the source of toDouble(ByteBuffer value)
public static double toDouble(ByteBuffer value)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static double toDouble(ByteBuffer value) { double result = 0d; try {//from w w w . ja va 2 s .c om if (value != null) { int originPos = value.position(); result = value.getDouble(); value.position(originPos); } } catch (Exception ex) { // ex.printStackTrace(); } return result; } }