HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 285005 thumbnail
User 452305 avatar

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.
  • 14
  • 0
  • 2392
  • 6

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.