code: public static Closeable single(
              final boolean throwIOException,
              final boolean throwLast,
              final Closeable... closeables
      )
      {
          return new Closeable() {
  
              @Override
              public void close() throws IOException {
                  closeAll(throwIOException, throwLast, closeables);
              }
          };
      }
docs: Create a single Closeable which closes all of the specified closeables
  
  @param throwIOException if true, throw an IOException if encountered, otherwise do not throw anything
  @param throwLast        if true, only throw the last IOException encountered, otherwise throw the first
  @param closeables       array of closeables
  
  @return closeable