Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 17, 2018 18:05
Show Gist options
  • Save anitaa1990/44f8bdafb9a52ebccd34b587380beec7 to your computer and use it in GitHub Desktop.
Save anitaa1990/44f8bdafb9a52ebccd34b587380beec7 to your computer and use it in GitHub Desktop.
Observable.just("A", "B", "C", "D", "E", "F")
.buffer(2)
.subscribe(new Observer<List<String>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<String> strings) {
System.out.println("onNext(): ");
for (String s : strings) {
System.out.println("String: " + s);
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment