Here you can find the source of bytesToDouble(byte[] bytes, int off)
public static double bytesToDouble(byte[] bytes, int off)
//package com.java2s; //License from project: Open Source License public class Main { public static double bytesToDouble(byte[] bytes, int off) { long el = 0L; int shift = 64; int lim = off + 8; for (int i = off; i < lim; i++) { shift -= 8;// w w w. ja va 2 s . co m el |= (long) (bytes[i] & 0xFF) << shift; } return Double.longBitsToDouble(el); } }