src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> doOnEach(final Observer<? super T> observer) {
        ObjectHelper.requireNonNull(observer, "observer is null");
        return doOnEach(
                ObservableInternalHelper.observerOnNext(observer),
                ObservableInternalHelper.observerOnError(observer),
                ObservableInternalHelper.observerOnComplete(observer),
                Functions.EMPTY_ACTION);
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> doOnEach(final Observer<? super T> observer) {
        ObjectHelper.requireNonNull(observer, "observer is null");
        return doOnEach(
                ObservableInternalHelper.observerOnNext(observer),
                ObservableInternalHelper.observerOnError(observer),
                ObservableInternalHelper.observerOnComplete(observer),
                Functions.EMPTY_ACTION);
    }
Modifies the source ObservableSource so that it notifies an Observer for each item and terminal event it emits.
<p>
In case the {@code onError} of the supplied observer throws, the downstream will receive a composite
exception containing the original exception and the exception thrown by {@code onError}. If either the
{@code onNext} or the {@code onComplete} method of the supplied observer throws, the downstream will be
terminated and will receive this thrown exception.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnEach.o.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code doOnEach} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param observer
the observer to be notified about onNext, onError and onComplete events on its
respective methods before the actual downstream Observer gets notified.
@return the source ObservableSource with the side-effecting behavior applied
@see <a href="http://reactivex.io/documentation/operators/do.html">ReactiveX operators documentation: Do</a>