docs: public void sendData() throws IOException {
          if (writer != null) {
              writer.write(buffer.toString());
              writer.flush();
              buffer = new StringBuilder();
          }
      }