Here you can find the source of bytes2double(byte[] bytes)
public static double bytes2double(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static double bytes2double(byte[] bytes) { long l = bytes2long(bytes); return Double.longBitsToDouble(l); }/* ww w . j av a2 s . c om*/ public static double bytes2double(byte[] bytes, int offset) { long l = bytes2long(bytes, offset); return Double.longBitsToDouble(l); } public static long bytes2long(byte[] bytes) { long num = 0; for (int i = 0; i < 8; i++) { num <<= 8; num |= (bytes[i] & 0xff); } return num; } public static long bytes2long(byte[] bytes, int offset) { long num = 0; for (int i = offset; i < offset + 8; i++) { num <<= 8; num |= (bytes[i] & 0xff); } return num; } }