private void doFlush() {
    if (myBuffer == null || myBuffer.isEmpty()) {
      return;
    }
    myListener.onTaskOutput(myTaskId, myBuffer.toString(), myStdOut);
    myBuffer.setLength(0);
  }
private void doFlush()