docs: public static <T, U extends InputStream> T withStream(U stream, @ClosureParams(value=FirstParam.class) Closure<T> closure) throws IOException {
          try {
              T result = closure.call(stream);
  
              InputStream temp = stream;
              stream = null;
              temp.close();
  
              return result;
          } finally {
              closeWithWarning(stream);
          }
      }