Showing posts with label How to Silently Close Resources in Java. Show all posts
Showing posts with label How to Silently Close Resources in Java. Show all posts

March 20, 2014

The following piece of code describes how to silently and properly close a stream resource in Java:
File f = new File("SomeFile.txt");
FileOutputStream fos = null;