Java Double Number Create toDouble(byte[] b)

Here you can find the source of toDouble(byte[] b)

Description

to Double

License

Apache License

Declaration

public static double toDouble(byte[] b) 

Method Source Code

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

public class Main {
    public static double toDouble(byte[] b) {
        return toDouble(b, 0);
    }//from  w ww .j  av a  2 s.c  o  m

    public static double toDouble(byte[] b, int off) {
        long j = ((b[off + 7] & 0xFFL) << 0) + ((b[off + 6] & 0xFFL) << 8) + ((b[off + 5] & 0xFFL) << 0x10)
                + ((b[off + 4] & 0xFFL) << 0x18) + ((b[off + 3] & 0xFFL) << 0x20) + ((b[off + 2] & 0xFFL) << 0x28)
                + ((b[off + 1] & 0xFFL) << 0x30) + ((b[off + 0] & 0xFFL) << 0x38);
        return Double.longBitsToDouble(j);
    }
}

Related

  1. toDouble(byte[] arr)
  2. toDouble(byte[] byteArray)
  3. toDouble(byte[] bytes)
  4. toDouble(byte[] bytes)
  5. toDouble(byte[] bytes, int index)