Use try-with-resources for closing the stream
Merge pull request #390 from Collaborne/helper-stream-java7

Use try-with-resources for closing the stream