code: public static long bytesToLong(final byte[] arr) {
      long v = 0;
      for (int i = 0; i < 8; i++) {
        v |= (arr[i] & 0XFFL) << (i * 8);
      }
      return v;
    }
docs: Returns a long extracted from a Little-Endian byte array.
  @param arr the given byte array
  @return a long extracted from a Little-Endian byte array.