code: public static <T> T withReader(URL url, @ClosureParams(value = SimpleType.class, options = "java.io.Reader") Closure<T> closure) throws IOException {
          return IOGroovyMethods.withReader(url.openConnection().getInputStream(), closure);
      }
docs: Helper method to create a new BufferedReader for a URL and then
  passes it to the closure.  The reader is closed after the closure returns.
  
  @param url     a URL
  @param closure the closure to invoke with the reader
  @return the value returned by the closure
  @throws IOException if an IOException occurs.
  @since 1.5.2