You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
StringObservable.decode should call onError when buffer not empty on completion #32
At the moment if StringObservable.decode is called on a stream of byte[] and the source stream completes with bytes left over in the buffer (more is required before a string can be emitted) then the observable effectively hangs (onCompleted is not called). Because this situation cannot be distinguished from the source not completing or hanging I'd like to see StringObservable.decode call onError with some custom exception type that can be ignored if people wish using the normal means.
Activity
akarnokd commentedon Sep 29, 2015
Sounds like a good idea to me.
abersnaze commentedon Sep 30, 2015
It's not entirely obviously but it is actually the default behavior to replace malformed chars with a question mark char. It is possible to pass in a custom CharsetDecoder with different malformed handling. See http://docs.oracle.com/javase/7/docs/api/java/nio/charset/CodingErrorAction.html.
Consider just adding an overload that makes it easy to set that enum.
abersnaze commentedon Mar 17, 2016
@davidmoten is this still an issue?
davidmoten commentedon Mar 17, 2016
@abersnaze I imagine so. I like your suggestion. I'll pop this on my list of things to do.