Here you can find the source of bytesToDoubles(byte[] b)
public static double[] bytesToDoubles(byte[] b)
//package com.java2s; /** Ben F Rayfield offers this software opensource MIT license */ public class Main { public static double[] bytesToDoubles(byte[] b) { double[] d = new double[b.length >> 3]; for (int i = 0; i < d.length; i++) { d[i] = Double.longBitsToDouble(readLongFromByteArray(b, i << 3)); }//from w w w .j a v a2s . c om return d; } public static long readLongFromByteArray(byte[] b, int byteIndex) { long j = 0; for (int i = 0; i < 8; i++) { j = (j << 8) | (b[byteIndex + i] & 0xff); } return j; } }