code: public static <T> Iterator<T> iterator(final Source<T> source) {
          return new Iterator<T>() {
              @Override
              public boolean hasNext() {
                  try {
                      return source.hasNext();
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }
  
              @Override
              public T next() {
                  try {
                      return source.next();
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }
  
              @Override
              public void remove() {
                  throw new UnsupportedOperationException();
              }
          };
      }
docs: Gets an iterator that wraps the given source.
  <p>
  Callers must ensure that the wrapped source is closed when no longer
  needed; the returned iterator provides no <code>close()</code> method.
  
  @param source the source.
  @param <T> the type.
  @return the iterator.