Code example for FileWriter

Methods: close, flush, write

0
        } 
         
        debug_datei.createNewFile();
         
        FileWriter writer;
        writer = new FileWriter(debug_datei, true);
         
        writer.write("" + string + System.getProperty("line.separator") + "");
         
        writer.flush();
        writer.close();
         
        } catch (Exception e) {
            System.err.println("Die Debug-Datei konnte nicht geschrieben werden.");
        } 
         
    } 
     
}