Here you can find the source of toBinaryFloatingPoint(double source)
public static byte[] toBinaryFloatingPoint(double source)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static byte[] toBinaryFloatingPoint(double source) { byte[] res = new byte[8]; ByteBuffer.wrap(res).putDouble(source); return res; }/*from w ww . jav a2s .c o m*/ }