@Override
  public void write(char[] cbuf, int off, int len) {
    if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length)
        || ((off + len) < 0)) {
      throw new IndexOutOfBoundsException();
    } else if (len == 0) {
      return;
    }
    sb.append(cbuf, off, len);
  }
Create a new string writer using the specified string-builder and line separator.

@param sb the {@link StringBuilder} to use as the internal buffer
@param lineSep the line separator to use, or null to use the default from
       {@link System#lineSeparator()}.
geode-core/src/main/java/org/apache/geode/internal/shared/StringPrintWriter.java