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

Unified Diff: sdk/lib/convert/converter.dart

Issue 20374003: Add transformer support to Converters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Upload Created 7 years, 5 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 | « sdk/lib/convert/convert.dart ('k') | sdk/lib/convert/json.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/converter.dart
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
index bdc52626eb664b59366c8c146e10040018d9f1e8..5563d7c35c6565130e4c3b13ea7c440f2fe16b66 100644
--- a/sdk/lib/convert/converter.dart
+++ b/sdk/lib/convert/converter.dart
@@ -10,7 +10,7 @@ part of dart.convert;
* *Converters are still experimental and are subject to change without notice.*
*
*/
-abstract class Converter<S, T> {
+abstract class Converter<S, T> implements StreamTransformer {
/**
* Converts [input] and returns the result of the conversion.
*/
@@ -33,6 +33,11 @@ abstract class Converter<S, T> {
throw new UnsupportedError(
"This converter does not support chunked conversions: $this");
}
+
+ // Subclasses are encouraged to provide better types.
+ Stream bind(Stream source) {
+ return new _ConverterTransformStream(source, this);
+ }
}
/**
« no previous file with comments | « sdk/lib/convert/convert.dart ('k') | sdk/lib/convert/json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698