private String unsignedIntegerDigits(StringBuilder textBuffer) throws IOException {
        char currentChar = currentChar();

        // Must have at least one digit.
        if (!Character.isDigit(currentChar)) {
            type = ERROR;
            value = INVALID_NUMBER;
            return null;
        }

        boolean isHex = false;

        // Extract the digits.
        StringBuilder digits = new StringBuilder();
        while (Character.isDigit(currentChar) || ('x' == currentChar && !isHex) || (isHex && isHexDigit(currentChar))) {

            if ('x' == currentChar) {
                isHex = true;
            }

            textBuffer.append(currentChar);
            digits.append(currentChar);
            currentChar = nextChar(); // consume digit
        }

        return digits.toString();
    }