write file via common io
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
public class WriteStringToFile {
public static void main(String[] args) throws IOException {
String string = "File Writter via Common io";
FileUtils.write(new File("./test.txt"), getText(message));
}
}