Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double getDouble(byte[] b, int index) {
        long l = b[0];
        l &= 255L;
        l |= b[1] << 8;
        l &= 65535L;
        l |= b[2] << 16;
        l &= 16777215L;
        l |= b[3] << 24;
        l &= 4294967295L;
        l |= b[4] << 32;
        l &= 1099511627775L;
        l |= b[5] << 40;
        l &= 281474976710655L;
        l |= b[6] << 48;
        l &= 72057594037927935L;
        l |= b[7] << 56;
        return Double.longBitsToDouble(l);
    }
}