code: public static String ulong2str(final long ulongValue, final int radix, final char[] charBuffer) {
      if (radix < 2 || radix > 36) {
        throw new IllegalArgumentException("Illegal radix [" + radix + ']');
      }
  
      if (ulongValue == 0) {
        return "0";
      } else {
        final String result;
        if (ulongValue > 0) {
          result = Long.toString(ulongValue, radix).toUpperCase(Locale.ENGLISH);
        } else {
          final char[] buffer = charBuffer == null || charBuffer.length < 64 ? new char[64] : charBuffer;
          int pos = buffer.length;
          long topPart = ulongValue >>> 32;
          long bottomPart = (ulongValue & 0xFFFFFFFFL) + ((topPart % radix) << 32);
          topPart /= radix;
          while ((bottomPart | topPart) > 0) {
            final int val = (int) (bottomPart % radix);
            buffer[--pos] = (char) (val < 10 ? '0' + val : 'A' + val - 10);
            bottomPart = (bottomPart / radix) + ((topPart % radix) << 32);
            topPart /= radix;
          }
          result = new String(buffer, pos, buffer.length - pos);
        }
        return result;
      }
    }
docs: Convert unsigned long value into string representation with defined radix
  base.
  
  @param ulongValue value to be converted in string
  @param radix      radix base to be used for conversion, must be 2..36
  @param charBuffer char buffer to be used for conversion operations, should
  be not less than 64 char length, if length is less than 64 or null then new
  one will be created
  @return converted value as upper case string
  @throws IllegalArgumentException for wrong radix base
  @since 1.1