Here you can find the source of writeDouble(ByteBuffer buffer, double d)
public static final void writeDouble(ByteBuffer buffer, double d)
//package com.java2s; import java.nio.ByteBuffer; public class Main { public static final void writeDouble(ByteBuffer buffer, double d) { writeLong(buffer, Double.doubleToLongBits(d)); }//from w ww . j av a2 s . c om public static final void writeLong(ByteBuffer buffer, long l) { buffer.put((byte) (l & 0xff)); buffer.put((byte) (l >>> 8)); buffer.put((byte) (l >>> 16)); buffer.put((byte) (l >>> 24)); buffer.put((byte) (l >>> 32)); buffer.put((byte) (l >>> 40)); buffer.put((byte) (l >>> 48)); buffer.put((byte) (l >>> 56)); } }