code: public static <C extends Closeable> Closeable forIterable(
              @Nonnull final Logger log,
              @Nonnull final Iterable<C> closeables
      ) {
          return new Closeable() {
              public void close() throws IOException {
                  closeAll(log, closeables);
              }
          };
      }
docs: Create a composite {@link Closeable} that will close all underlying
  {@code closeables} references. The {@link Closeable#close()} method will
  perform a safe close of all wrapped Closeable objects. This is needed
  since successive calls of the {@link #closeAll(Logger, Closeable...)}
  method is not exception safe without an extra layer of try / finally.
  
  @param log The logger to write error messages out to.
  @param closeables The closeables to shutdown when the composite is closed.
  @param <C> A class that implements the {@link Closeable} interface.
  @return A composite Closeable that wraps all underlying {@code closeables}.