Java Long Number Create toLong(byte[] data)

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

Description

to Long

License

Apache License

Declaration

public static long toLong(byte[] data) 

Method Source Code

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

public class Main {
    public static long toLong(byte[] data) {
        return (((long) data[0] << 56) + ((long) (data[1] & 255) << 48)
                + ((long) (data[2] & 255) << 40)
                + ((long) (data[3] & 255) << 32)
                + ((long) (data[4] & 255) << 24) + ((data[5] & 255) << 16)
                + ((data[6] & 255) << 8) + ((data[7] & 255) << 0));
    }//from   www .  jav  a 2 s.  c  o m
}

Related

  1. toLong(byte[] bytes, int offset)
  2. ToLong(byte[] bytes, int offset)
  3. toLong(byte[] bytes, int offset)
  4. toLong(byte[] bytes, int offset)
  5. toLong(byte[] data)
  6. toLong(byte[] data)
  7. toLong(byte[] data)
  8. toLong(byte[] in)
  9. toLong(byte[] input)