Here you can find the source of readDouble(ByteBuffer buffer)
public static double readDouble(ByteBuffer buffer) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; public class Main { public static double readDouble(ByteBuffer buffer) throws IOException { return Double.longBitsToDouble(readLong(buffer)); }//ww w . j a va 2 s . c o m public static long readLong(ByteBuffer buffer) throws IOException { buffer.order(ByteOrder.LITTLE_ENDIAN); long value = buffer.getLong(); buffer.order(ByteOrder.BIG_ENDIAN); return value; } }