Last active
August 29, 2015 13:56
-
-
Save masazdream/9063279 to your computer and use it in GitHub Desktop.
さくっと使いたくなることある。
This file contains hidden or 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 characters
| /** | |
| * 指定したStringBuilderをファイルに書き出す | |
| * | |
| * @param filePath | |
| * @param sb | |
| */ | |
| public static void outputFile(String filePath, StringBuilder sb) { | |
| try { | |
| FileWriter fw = new FileWriter(filePath, false); | |
| PrintWriter pw = new PrintWriter(new BufferedWriter(fw)); | |
| pw.print(sb.toString()); | |
| pw.close(); | |
| } catch (IOException e) { | |
| System.out.println("[error]" + filePath + ", " + e.getMessage()); | |
| } | |
| System.out.println("[file output finish]" + filePath); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment