code: public static <T> Filter<T> from(final Sink<T> sink) {
          return new NonMutatingFilter<T>() {
              @Override
              public boolean accepts(T item) throws IOException {
                  sink.put(item);
                  return true;
              }
              @Override
              public void close() {
                  sink.close();
              }
          };
      }
docs: Gets a filter that sends objects to the given sink, returning the
  original item unchanged.
  <p>
  When the returned filter is closed, the underlying sink will be closed.
  
  @param sink the sink.
  @param <T> the type.
  @return the filter.