package ch.woggle.rohonxi.export;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

public class SimpleTextExport {
  private File file;

  public SimpleTextExport(File file) {
    this.file = file;
  }

  public void export(String text) {
    try (PrintWriter writer = new PrintWriter(file)) {
      writer.print(text);
    } catch (FileNotFoundException e) {
      // TODO
      e.printStackTrace();
    }
  }
}

@@ -120,127 +120,536 @@
 r;%0A%0A
-public class SimpleTextExport %7B%0A  private File file;%0A%0A  public SimpleTextExport(File file) %7B%0A    this.file = file;%0A  %7D%0A
+/**%0A * Export a String to a text file.%0A * %0A * @author Thomas Moser%0A *%0A */%0Apublic class SimpleTextExport %7B%0A  private File file;%0A%0A  /**%0A   * Create an export object given a file.%0A   * %3Cp%3E%0A   * An export will be written to that file.%0A   * %0A   * @param file%0A   */%0A  public SimpleTextExport(File file) %7B%0A    this.file = file;%0A  %7D%0A%0A  /**%0A   * Export a text to the File set with the constructor. If the file already exists, its contents%0A   * will be replaced with that text.%0A   * %0A   * @param text The text to export to the file.%0A   */
 %0A  p
@@ -806,22 +806,8 @@
 ) %7B%0A
-      // TODO%0A
     

Add comments