Skip to content

Instantly share code, notes, and snippets.

View driventokill's full-sized avatar
💭
You don't know what you don't know

Yang Fang driventokill

💭
You don't know what you don't know
View GitHub Profile
@driventokill
driventokill / BufferTransformer.java
Last active April 8, 2022 18:27
Buffer elements by time period or count in RxJava with backpressure supported
import io.reactivex.Flowable;
import io.reactivex.FlowableTransformer;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import java.io.IOException;