/// <summary>Obtains a buffer for formatting.</summary>
        /// <remarks>Obtains a buffer for formatting.</remarks>
        /// <param name="charBuffer">a buffer already available, or <code>null</code></param>
        /// <returns>
        /// the cleared argument buffer if there is one, or
        /// a new empty buffer that can be used for formatting
        /// </returns>
        protected internal virtual CharArrayBuffer InitBuffer(CharArrayBuffer charBuffer)
        {
            CharArrayBuffer buffer = charBuffer;

            if (buffer != null)
            {
                buffer.Clear();
            }
            else
            {
                buffer = new CharArrayBuffer(64);
            }
            return(buffer);
        }