Here you can find the source of toDouble(byte[] value)
public static double toDouble(byte[] value)
//package com.java2s; //License from project: Open Source License public class Main { public static double toDouble(byte[] value) { long longValue = toLong(value); double result = Double.longBitsToDouble(longValue); return result; }/* ww w . ja v a 2s. c o m*/ public static long toLong(byte[] value) { return toLong(value, 0); } /** * byte[] -> long * * @param value * @param offset * @return */ public static long toLong(byte[] value, int offset) { long result = 0L; result = result | (value[7] & 0xff); result = result | (((long) value[offset + 6] & 0xff) << 8); result = result | (((long) value[offset + 5] & 0xff) << 16); result = result | (((long) value[offset + 4] & 0xff) << 24); result = result | (((long) value[offset + 3] & 0xff) << 32); result = result | (((long) value[offset + 2] & 0xff) << 40); result = result | (((long) value[offset + 1] & 0xff) << 48); result = result | (((long) value[offset + 0] & 0xff) << 56); return result; } }