@Override
  public void writeStream(ExampleSet exampleSet, java.io.OutputStream outputStream)
      throws OperatorException {

    String columnSeparator = getParameterAsString(PARAMETER_COLUMN_SEPARATOR);
    boolean quoteNominalValues = getParameterAsBoolean(PARAMETER_QUOTE_NOMINAL_VALUES);
    boolean writeAttribNames = getParameterAsBoolean(PARAMETER_WRITE_ATTRIBUTE_NAMES);
    boolean formatDate = getParameterAsBoolean(PARAMETER_FORMAT_DATE);
    PrintWriter out = null;
    try {
      out = new PrintWriter(new OutputStreamWriter(outputStream, Encoding.getEncoding(this)));
      writeCSV(exampleSet, out, columnSeparator, quoteNominalValues, writeAttribNames, formatDate);
      out.flush();
    } finally {
      if (out != null) {
        out.close();
      }
    }
  }
 protected Charset getEncoding() {
   return Encoding.getEncoding((String) encodingComboBox.getSelectedItem());
 }