Here you can find the source of writeDouble(double v, ByteBuffer buffer)
public static void writeDouble(double v, 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 void writeDouble(double v, ByteBuffer buffer) throws IOException { writeLong(Double.doubleToRawLongBits(v), buffer); }/*from ww w .j ava2 s. c o m*/ public static void writeLong(long v, ByteBuffer buffer) throws IOException { buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.putLong(v); buffer.order(ByteOrder.BIG_ENDIAN); } }