예제 #1
0
 /// <summary>
 /// Gets the buffer.
 /// </summary>
 /// <returns>StringBuffer.</returns>
 private StringBuffer GetBuffer()
 {
     if (_buffer == null)
         _buffer = new StringBuffer(1025);
     else
         _buffer.Position = 0;
     return _buffer;
 }
예제 #2
0
 private void WriteCharToBuffer(StringBuffer buffer, char writeChar, int lastWritePosition, int writeToPosition)
 {
     if (writeToPosition > lastWritePosition)
         buffer.Append(_chars, lastWritePosition, writeToPosition - lastWritePosition);
     buffer.Append(writeChar);
 }