Skip to content

Instantly share code, notes, and snippets.

@amir20
Created December 20, 2011 21:28
Show Gist options
  • Save amir20/1503363 to your computer and use it in GitHub Desktop.
Save amir20/1503363 to your computer and use it in GitHub Desktop.
Path path = Paths.get(file.txt);
try (BufferedWriter writer = Files.newBufferedWriter(path, Charset.defaultCharset(), WRITE)) {
writer.write(This is a test);
}
catch(IOException x) {
System.err.format(IOException: %s%n, x);
}
@amir20
Copy link
Author

amir20 commented Dec 20, 2011

GPL open source.

@amir20
Copy link
Author

amir20 commented Dec 20, 2011

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment