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