@GwtIncompatible("incompatible method")
    public StrBuilder append(final CharBuffer buf) {
        if (buf == null) {
            return appendNull();
        }
        if (buf.hasArray()) {
            final int length = buf.remaining();
            final int len = length();
            ensureCapacity(len + length);
            System.arraycopy(buf.array(), buf.arrayOffset() + buf.position(), buffer, len, length);
            size += length;
        } else {
            append(buf.toString());
        }
        return this;
    }
@ GwtIncompatible ( "incompatible method" ) public StrBuilder append ( final CharBuffer buf ) { if ( buf == null ) { return appendNull ( ) ; } if ( buf . hasArray ( ) ) { final int length = buf . remaining ( ) ; final int len = length ( ) ; ensureCapacity ( len + length ) ; System . arraycopy ( buf . array ( ) , buf . arrayOffset ( ) + buf . position ( ) , buffer , len , length ) ; size += length ; } else { append ( buf . toString ( ) ) ; } return this ; }
Appends the contents of a char buffer to this string builder.
Appending null will call {@link #appendNull()}.

@param buf  the char buffer to append
@return this, to enable chaining
@since 3.4