src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) {
        return buffer(count, count, bufferSupplier);
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) {
        return buffer(count, count, bufferSupplier);
    }
Returns an Observable that emits buffers of items it collects from the source ObservableSource. The resulting
ObservableSource emits connected, non-overlapping buffers, each containing {@code count} items. When the source
ObservableSource completes, the resulting ObservableSource emits the current buffer and propagates the notification
from the source ObservableSource. Note that if the source ObservableSource issues an onError notification
the event is passed on immediately without first emitting the buffer it is in the process of assembling.
<p>
<img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/buffer3.png" alt="">
<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 <U> the collection subclass type to buffer into
@param count
the maximum number of items in each buffer before it should be emitted
@param bufferSupplier
a factory function that returns an instance of the collection subclass to be used and returned
as the buffer
@return an Observable that emits connected, non-overlapping buffers, each containing at most
{@code count} items from the source ObservableSource
@see <a href="http://reactivex.io/documentation/operators/buffer.html">ReactiveX operators documentation: Buffer</a>