code: public static <T> Stream<T> toStream( Iterator<T> iterator)
      {
      Iterable<T> iterable = () -> iterator;
      return toStream( iterable);
      }
docs: Returns a stream that produces the sequence defined by the given Iterator.