code: public static long bytesToLong(byte[] bytes) {
      long l = 0;
      for (int i = 0; i < 0 + 8; i++) {
        l <<= 8;
        l ^= bytes[i] & 0xFF;
      }
      return l;
    }
docs: Convert byte array to original long value.
  
  @param bytes the byte array
  @return the original long value