Here you can find the source of putDouble(byte[] bb, double x, int index)
public static void putDouble(byte[] bb, double x, int index)
//package com.java2s; public class Main { public static void putDouble(byte[] bb, double x, int index) { // byte[] b = new byte[8]; long l = Double.doubleToLongBits(x); for (int i = 0; i < 8; i++) { bb[index + i] = new Long(l).byteValue(); l = l >> 8;//from ww w. ja va2 s. c o m } } }