code: public WriteStreamOld openWrite()
    {
      if (_cb != null)
        _cb.clear();
      else
        _cb = CharBuffer.allocate();
  
      if (_ws == null)
        _ws = new WriteStreamOld(this);
      else
        _ws.init(this);
  
      try {
        _ws.setEncoding("utf-8");
      } catch (UnsupportedEncodingException e) {
      }
  
      return _ws;
    }
docs: Opens a write stream using this StringWriter as the resulting string