Here you can find the source of bytesToDouble(byte[] bytes)
public static double bytesToDouble(byte[] bytes)
//package com.java2s; /*/*from w w w . ja va2 s .co m*/ * Copyright 2012 Alibaba.com All right reserved. This software is the * confidential and proprietary information of Alibaba.com ("Confidential * Information"). You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement you entered * into with Alibaba.com. */ public class Main { public static double bytesToDouble(byte[] bytes) { long l; l = bytes[0]; l &= 0xff; l |= ((long) bytes[1] << 8); l &= 0xffff; l |= ((long) bytes[2] << 16); l &= 0xffffff; l |= ((long) bytes[3] << 24); l &= 0xffffffffl; l |= ((long) bytes[4] << 32); l &= 0xffffffffffl; l |= ((long) bytes[5] << 40); l &= 0xffffffffffffl; l |= ((long) bytes[6] << 48); l &= 0xffffffffffffffl; l |= ((long) bytes[7] << 56); return Double.longBitsToDouble(l); } }