Java Byte Array to Long byte2long(byte[] value, int count)

Here you can find the source of byte2long(byte[] value, int count)

Description

bytelong

License

Apache License

Declaration

public static long byte2long(byte[] value, int count) 

Method Source Code

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

public class Main {
    public static long byte2long(byte[] value, int count) {
        long result = (((long) (value[0 + count]) & 0xFF) << 56) | (((long) (value[1 + count]) & 0xFF) << 48)
                | (((long) (value[2 + count]) & 0xFF) << 40) | (((long) (value[3 + count]) & 0xFF) << 32)
                | (((long) (value[4 + count]) & 0xFF) << 24) | (((long) (value[5 + count]) & 0xFF) << 16)
                | (((long) (value[6 + count]) & 0xFF) << 8) | ((long) (value[7 + count]) & 0xFF);
        return result;
    }/*from www  . j  av a2 s. c o m*/
}

Related

  1. byte2long(byte[] b)
  2. byte2long(byte[] b)
  3. byte2Long(byte[] bytes, int offset)
  4. byte2Long(byte[] bytes, int offset)
  5. byte2long(byte[] data)
  6. byte2long(final byte[] v)
  7. bytes2long(byte[] b)
  8. bytes2long(byte[] byteArray, int offset)
  9. bytes2long(byte[] bytes)