Java Long Number Create toLong(byte[] b)

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

Description

to Long

License

Apache License

Declaration

public static long toLong(byte[] b) 

Method Source Code

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

public class Main {
    public static long toLong(byte[] b) {
        return toLong(b, 0);
    }//from www .  j a  v  a  2s  .  c o m

    public static long toLong(byte[] b, int off) {
        return ((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);
    }
}

Related

  1. toLong(byte[] b)
  2. toLong(byte[] b)
  3. toLong(byte[] b)
  4. toLong(byte[] b)
  5. toLong(byte[] b)
  6. toLong(byte[] b)
  7. toLong(byte[] b, int off, boolean bigEndian)
  8. toLong(byte[] buf)
  9. toLong(byte[] buf)