Java Convert via ByteBuffer toBinaryFloatingPoint(double source)

Here you can find the source of toBinaryFloatingPoint(double source)

Description

to Binary Floating Point

License

Open Source License

Declaration

public static byte[] toBinaryFloatingPoint(double source) 

Method Source Code

//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*/
}

Related

  1. toAsciiBytes(String s)
  2. toASCIIString(URI u)
  3. toAttributeValue(Object value)
  4. toBigDecimal(byte[] bytes, int scale)
  5. toBigInteger(byte[] bytes)
  6. toBinaryString(byte[] b)
  7. toBuffer(boolean[] src, int offset)
  8. toBuffer(byte[] arr)
  9. toBuffer(byte[] arr)