Here you can find the source of doubleToByteArray(double d)
public static byte[] doubleToByteArray(double d)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] doubleToByteArray(double d) { long l = Double.doubleToRawLongBits(d); return new byte[] { (byte) ((l >> 0) & 0xff), (byte) ((l >> 8) & 0xff), (byte) ((l >> 16) & 0xff), (byte) ((l >> 24) & 0xff), (byte) ((l >> 32) & 0xff), (byte) ((l >> 40) & 0xff), (byte) ((l >> 48) & 0xff), (byte) ((l >> 56) & 0xff) }; }/*from w ww.ja v a 2 s.c om*/ }