Here you can find the source of readReal(ByteBuffer bb)
public static double readReal(ByteBuffer bb) throws IOException
//package com.java2s; //License from project: LGPL import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.channels.FileChannel; public class Main { public static double readReal(FileChannel channel) throws IOException { ByteBuffer bb = ByteBuffer.allocate(8); bb.order(ByteOrder.LITTLE_ENDIAN); channel.read(bb);//from ww w. ja v a 2 s . co m bb.rewind(); return bb.getDouble(); } public static double readReal(ByteBuffer bb) throws IOException { return bb.getDouble(); } }