code: private static String unsignedToString(final long value) {
      if (value >= 0) {
        return Long.toString(value);
      } else {
        // Pull off the most-significant bit so that BigInteger doesn't think
        // the number is negative, then set it again using setBit().
        return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL)
                         .setBit(63).toString();
      }
    }
docs: Convert an unsigned 64-bit integer to a string.