src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final <U extends Collection<? super T>> Flowable<U> buffer(long timespan, long timeskip, TimeUnit unit,
            Scheduler scheduler, Callable<U> bufferSupplier) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        ObjectHelper.requireNonNull(bufferSupplier, "bufferSupplier is null");
        return RxJavaPlugins.onAssembly(new FlowableBufferTimed<T, U>(this, timespan, timeskip, unit, scheduler, bufferSupplier, Integer.MAX_VALUE, false));
    }
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final <U extends Collection<? super T>> Flowable<U> buffer(long timespan, long timeskip, TimeUnit unit,
            Scheduler scheduler, Callable<U> bufferSupplier) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        ObjectHelper.requireNonNull(bufferSupplier, "bufferSupplier is null");
        return RxJavaPlugins.onAssembly(new FlowableBufferTimed<T, U>(this, timespan, timeskip, unit, scheduler, bufferSupplier, Integer.MAX_VALUE, false));
    }
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < U extends Collection < ? super T > > Flowable < U > buffer ( long timespan , long timeskip , TimeUnit unit , Scheduler scheduler , Callable < U > bufferSupplier ) { ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( bufferSupplier , "bufferSupplier is null" ) ; return RxJavaPlugins . onAssembly ( new FlowableBufferTimed < T , U > ( this , timespan , timeskip , unit , scheduler , bufferSupplier , Integer . MAX_VALUE , false ) ) ; }
Returns a Flowable that emits buffers of items it collects from the source Publisher. The resulting
Publisher starts a new buffer periodically, as determined by the {@code timeskip} argument, and on the
specified {@code scheduler}. It emits each buffer after a fixed timespan, specified by the
{@code timespan} argument. When the source Publisher completes, the resulting Publisher emits the current buffer
and propagates the notification from the source Publisher. Note that if the source Publisher 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/buffer7.s.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>This operator does not support backpressure as it uses time. It requests {@code Long.MAX_VALUE}
upstream and does not obey downstream requests.</dd>
<dt><b>Scheduler:</b></dt>
<dd>You specify which {@link Scheduler} this operator will use.</dd>
</dl>

@param <U> the collection subclass type to buffer into
@param timespan
the period of time each buffer collects items before it is emitted
@param timeskip
the period of time after which a new buffer will be created
@param unit
the unit of time that applies to the {@code timespan} and {@code timeskip} arguments
@param scheduler
the {@link Scheduler} to use when determining the end and start of a buffer
@param bufferSupplier
a factory function that returns an instance of the collection subclass to be used and returned
as the buffer
@return a Flowable that emits new buffers of items emitted by the source Publisher periodically after
a fixed timespan has elapsed
@see <a href="http://reactivex.io/documentation/operators/buffer.html">ReactiveX operators documentation: Buffer</a>
Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting Publisher starts a new buffer periodically as determined by the { @code timeskip } argument and on the specified { @code scheduler } . It emits each buffer after a fixed timespan specified by the { @code timespan } argument . When the source Publisher completes the resulting Publisher emits the current buffer and propagates the notification from the source Publisher . Note that if the source Publisher 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 / buffer7 . s . png alt = > <dl > <dt > <b > Backpressure : < / b > < / dt > <dd > This operator does not support backpressure as it uses time . It requests { @code Long . MAX_VALUE } upstream and does not obey downstream requests . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > You specify which { @link Scheduler } this operator will use . < / dd > < / dl >