private static void append(Appendable buf, char c) {
        try {
            buf.append(c);
        } catch (IOException e) {
            throw new IllegalStateException("Unable to append character to internal buffer.", e);
        }
    }
Appends the specified character into the buffer, rethrowing any encountered
{@link IOException} as an {@link IllegalStateException} (since this method is used for internal
implementation needs and we only ever use StringBuilders, we should never encounter an IOException).

@param buf the buffer to append to
@param c   the character to append.
lang/src/main/java/org/apache/shiro/lang/codec/H64.java