Skip to content

use AbstractOnSubscribe for StringObservable.from(InputStream) and from(Reader) #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2015

Conversation

davidmoten
Copy link
Contributor

This PR uses AbstractOnSubscribe to provide much simpler implementations of StringObservable.from(InputStream) and StringObservable.from(Reader) that support backpressure.

This PR also

if (count == -1)
state.onCompleted();
else
state.onNext(Arrays.copyOf(buffer, count));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd only copy if count < size.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I'll adjust

@davidmoten
Copy link
Contributor Author

Moved the explicit version issue in build.gradle to #17. This PR may be ok for merge now.

@@ -7,7 +7,7 @@ apply plugin: 'rxjava-project'
apply plugin: 'java'

dependencies {
compile 'io.reactivex:rxjava:1.0.+'
compile 'io.reactivex:rxjava:1.0.9'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This remained here accidentally.

@davidmoten
Copy link
Contributor Author

woops, sorry, fixed.

@akarnokd
Copy link
Member

Thanks.

akarnokd added a commit that referenced this pull request Apr 12, 2015
use AbstractOnSubscribe for StringObservable.from(InputStream) and from(Reader)
@akarnokd akarnokd merged commit 8ad398b into ReactiveX:1.x Apr 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants