By fifthposition
via mrhaki.blogspot.com
Published: Nov 10 2009 / 12:04
Normally when we are working with readers and writers in Java we must make sure we close the appropriate reader and writer. Groovy has several with...() methods for File, URL or streams and writers, where ... is the name of the reader or writer. We pass a closure to these methods and Groovy makes sure all readers and writers are closed correctly, even if exceptions are thrown in the closure.
Add your comment
Voters For This Link (15)
-
fifthposition -
aclarke -
mswatcher -
glaforge -
pron -
pashimito -
biehl -
fedecarg -
phymata -
gubbes -
elamaran -
john.jian.fang -
paulk_asert -
rogerjose81 -
aalmiray