Here you can find the source of toByteArray(double value)
public static byte[] toByteArray(double value)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static byte[] toByteArray(double value) { byte[] bytes = new byte[8]; ByteBuffer.wrap(bytes).putDouble(value); return bytes; }/*from w w w. j a v a 2 s. co m*/ }