Code example for CharArrayBuffer

Methods: clear

0
     * @return  the cleared argument buffer if there is one, or 
     *          a new empty buffer that can be used for formatting 
     */ 
    protected CharArrayBuffer initBuffer(CharArrayBuffer buffer) {
        if (buffer != null) {
            buffer.clear();
        } else { 
            buffer = new CharArrayBuffer(64);
        } 
        return buffer;
    } 
 
 
    /** 
     * Formats a protocol version. 
     * 
     * @param version           the protocol version to format 
     * @param formatter         the formatter to use, or 
     *                          <code>null</code> for the 
     *                          {@link #DEFAULT default} 
     *