Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: pkg/http/lib/src/byte_stream.dart

Issue 12086110: Use the dart:async Stream API thoroughly in Pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utils/pub/command_lish.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/byte_stream.dart
diff --git a/pkg/http/lib/src/byte_stream.dart b/pkg/http/lib/src/byte_stream.dart
index 3de17efad2b7644b22f482eff9cf3cb143288ef2..72a53a0e066fc5cc3726ad216d074fbe613add84 100644
--- a/pkg/http/lib/src/byte_stream.dart
+++ b/pkg/http/lib/src/byte_stream.dart
@@ -33,4 +33,7 @@ class ByteStream extends StreamView<List<int>> {
/// [encoding], which defaults to `Encoding.UTF_8`.
Future<String> bytesToString([Encoding encoding=Encoding.UTF_8]) =>
toBytes().then((bytes) => decodeString(bytes, encoding));
+
+ Stream<String> toStringStream([Encoding encoding=Encoding.UTF_8]) =>
+ mappedBy((bytes) => decodeString(bytes, encoding));
}
« no previous file with comments | « no previous file | utils/pub/command_lish.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698