Here you can find the source of writeFile(String path, String content)
@SuppressWarnings("unused") public static void writeFile(String path, String content)
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; public class Main { @SuppressWarnings("unused") public static void writeFile(String path, String content) { try {// ww w. j av a 2s . c o m Files.write(Paths.get(path), content.getBytes()); } catch (IOException e) { throwRuntime(e); } } public static void throwRuntime(Exception e) { throw new RuntimeException(e.getMessage(), e); } }