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

Unified Diff: runtime/bin/input_stream.dart

Issue 8772008: Add line handler to string stream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | runtime/bin/string_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/input_stream.dart
diff --git a/runtime/bin/input_stream.dart b/runtime/bin/input_stream.dart
index e9f496b66b2c0b847f153ce8d5eb40ea29d257cc..0f009a33a53069641b3f9edef9513a5ddf5ee51f 100644
--- a/runtime/bin/input_stream.dart
+++ b/runtime/bin/input_stream.dart
@@ -71,7 +71,8 @@ interface StringInputStream factory _StringInputStream {
/**
* Reads the next line from the stream. The line ending characters
* will not be part og the returned string. If a full line is not
- * available null will be returned.
+ * available null will be returned. The line break character(s) are
+ * discarded.
*/
String readLine();
@@ -87,11 +88,20 @@ interface StringInputStream factory _StringInputStream {
String get encoding();
/**
- * Sets the handler that gets called when data is available.
+ * Sets the handler that gets called when data is available. The two
+ * handlers [dataHandler} and [lineHandler] are mutually exclusive
+ * and setting one will remove the other.
*/
void set dataHandler(void callback());
/**
+ * Sets the handler that gets called when a line is available. The
+ * two handlers [dataHandler} and [lineHandler] are mutually
+ * exclusive and setting one will remove the other.
+ */
+ void set lineHandler(void callback());
+
+ /**
* Sets the handler that gets called when there will be no more data
* available in the stream.
*/
« no previous file with comments | « no previous file | runtime/bin/string_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698