Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Helper class to wrap a [StreamConsumer<List<int>>] and provide | 8 * Helper class to wrap a [StreamConsumer<List<int>>] and provide |
| 9 * utility functions for writing to the StreamConsumer directly. The | 9 * utility functions for writing to the StreamConsumer directly. The |
| 10 * [IOSink] buffers the input given by all [StringSink] methods and will delay | 10 * [IOSink] buffers the input given by all [StringSink] methods and will delay |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 * | 89 * |
| 90 * This function must not be called when a stream is currently being added | 90 * This function must not be called when a stream is currently being added |
| 91 * using [addStream]. | 91 * using [addStream]. |
| 92 * | 92 * |
| 93 * This operation is non-blocking. See [flush] or [done] for how to get any | 93 * This operation is non-blocking. See [flush] or [done] for how to get any |
| 94 * errors generated by this call. | 94 * errors generated by this call. |
| 95 */ | 95 */ |
| 96 void addError(error, [StackTrace stackTrace]); | 96 void addError(error, [StackTrace stackTrace]); |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * Adds all elements of the given [stream] to `this`. | 99 * Returns a [Future] that completes when |
|
Lasse Reichstein Nielsen
2015/09/21 09:50:47
Retain the original first line, then add these two
sethladd
2015/09/21 09:56:21
Done.
| |
| 100 * all elements of the given [stream] are added to `this`. | |
| 100 */ | 101 */ |
| 101 Future addStream(Stream<List<int>> stream); | 102 Future addStream(Stream<List<int>> stream); |
| 102 | 103 |
| 103 /** | 104 /** |
| 104 * Returns a [Future] that completes once all buffered data is accepted by the | 105 * Returns a [Future] that completes once all buffered data is accepted by the |
| 105 * to underlying [StreamConsumer]. | 106 * to underlying [StreamConsumer]. |
| 106 * | 107 * |
| 107 * It's an error to call this method, while an [addStream] is incomplete. | 108 * It's an error to call this method, while an [addStream] is incomplete. |
| 108 * | 109 * |
| 109 * NOTE: This is not necessarily the same as the data being flushed by the | 110 * NOTE: This is not necessarily the same as the data being flushed by the |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 | 297 |
| 297 void writeln([Object obj = ""]) { | 298 void writeln([Object obj = ""]) { |
| 298 write(obj); | 299 write(obj); |
| 299 write("\n"); | 300 write("\n"); |
| 300 } | 301 } |
| 301 | 302 |
| 302 void writeCharCode(int charCode) { | 303 void writeCharCode(int charCode) { |
| 303 write(new String.fromCharCode(charCode)); | 304 write(new String.fromCharCode(charCode)); |
| 304 } | 305 } |
| 305 } | 306 } |
| OLD | NEW |