cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/util/Helper.java
public void writeBufferToFile(String outputPath) {
        File file = new File(outputPath);
        try {
            file.createNewFile();
        } catch (IOException e1) {
            e1.printStackTrace();
            System.exit(0);
        }
        try {
            BufferedWriter writer = new BufferedWriter(new FileWriter(file));
            writer.write(buffer.toString());
            writer.close();
            System.out.format("File %s created.\n", outputPath);
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
/**
     * Write the data from the {@link #buffer} to a file
     *
     * @param outputPath the path of the file to save the data
     */
Write the data from the  #buffer to a file
@param outputPath the path of the file to save the data
Write the data from the #buffer to a file @param outputPath the path of the file to save the data
public void writeBufferToFile(String outputPath) {
        File file = new File(outputPath);
        try {
            file.createNewFile();
        } catch (IOException e1) {
            e1.printStackTrace();
            System.exit(0);
        }
        try {
            BufferedWriter writer = new BufferedWriter(new FileWriter(file));
            writer.write(buffer.toString());
            writer.close();
            System.out.format("File %s created.\n", outputPath);
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
public void writeBufferToFile ( String outputPath ) { File file = new File ( outputPath ) ; try { file . createNewFile ( ) ; } catch ( IOException e1 ) { e1 . printStackTrace ( ) ; System . exit ( 0 ) ; } try { BufferedWriter writer = new BufferedWriter ( new FileWriter ( file ) ) ; writer . write ( buffer . toString ( ) ) ; writer . close ( ) ; System . out . format ( "File %s created.\n" , outputPath ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; System . exit ( 0 ) ; } }
Write the data from the {@link #buffer} to a file
 @param outputPath the path of the file to save the data
Write the data from the { @link #buffer } to a file @param outputPath the path of the file to save the data