Here you can find the source of bytesToDouble(byte[] bytes)
public static double bytesToDouble(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static double bytesToDouble(byte[] bytes) { long l = bytesToLong(bytes); return Double.longBitsToDouble(l); }/*from ww w. ja v a 2 s.co m*/ public static long bytesToLong(byte[] bytes) { return bytesToLong(bytes, 0); } public static long bytesToLong(byte[] bytes, int offset) { return (0xffL & (long) bytes[offset]) | (0xff00L & ((long) bytes[offset + 1] << 8)) | (0xff0000L & ((long) bytes[offset + 2] << 16)) | (0xff000000L & ((long) bytes[offset + 3] << 24)) | (0xff00000000L & ((long) bytes[offset + 4] << 32)) | (0xff0000000000L & ((long) bytes[offset + 5] << 40)) | (0xff000000000000L & ((long) bytes[offset + 6] << 48)) | (0xff00000000000000L & ((long) bytes[offset + 7] << 56)); } }