src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <B> Observable<List<T>> buffer(Callable<? extends ObservableSource<B>> boundarySupplier) {
        return buffer(boundarySupplier, ArrayListSupplier.<T>asCallable());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <B> Observable<List<T>> buffer(Callable<? extends ObservableSource<B>> boundarySupplier) {
        return buffer(boundarySupplier, ArrayListSupplier.<T>asCallable());
    }
Returns an Observable that emits buffers of items it collects from the source ObservableSource. The resulting
ObservableSource emits connected, non-overlapping buffers. It emits the current buffer and replaces it with a
new buffer whenever the ObservableSource produced by the specified {@code boundarySupplier} emits an item.
<p>
<img width="640" height="395" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/buffer1.png" alt="">
<p>
If either the source {@code ObservableSource} or the boundary {@code ObservableSource} issues an {@code onError} notification the event
is passed on immediately without first emitting the buffer it is in the process of assembling.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>This version of {@code buffer} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <B> the value type of the boundary-providing ObservableSource
@param boundarySupplier
a {@link Callable} that produces an ObservableSource that governs the boundary between buffers.
Whenever the supplied {@code ObservableSource} emits an item, {@code buffer} emits the current buffer and
begins to fill a new one
@return an Observable that emits a connected, non-overlapping buffer of items from the source ObservableSource
each time the ObservableSource created with the {@code closingIndicator} argument emits an item
@see <a href="http://reactivex.io/documentation/operators/buffer.html">ReactiveX operators documentation: Buffer</a>