Last active
September 28, 2015 09:09
-
-
Save hacksoldier/c4bc98e2b2f9e2d81882 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
| public void writeFileOnDisk (String path, String fileName, String csn){ | |
| try{ | |
| PrintWriter write = new PrintWriter(path + fileName, csn); | |
| write.println("The first line"); | |
| write.close(); | |
| } catch (IOException ex) { | |
| log.error("Error in writeFileOnDisk", ex); | |
| } finally { | |
| if(write != null) | |
| write.close(); | |
| } | |
| } | |
| //call example: writeFileOnDisk ("C:\\dati\\", "fileTest.txt", "UTF-8"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment