Created
August 29, 2015 15:19
Revisions
-
mick001 created this gist
Aug 29, 2015 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class GetOutData { private String content; // if you need to print a string public GetOutData(String output) { this.content = output; } public void writeString(String path) { try { File file = new File(path); if(!file.exists()) { file.createNewFile(); } FileWriter fw = new FileWriter(file.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); bw.write(this.content); bw.close(); }catch(IOException e) { e.printStackTrace(); } } }