This is Java 7. Use [try with resources](http://www.mkyong.com/java/try-with-resources-example-in-jdk-7/)