Chromium Code Reviews| Index: sdk/lib/io/io_sink.dart |
| diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart |
| index a6d9f534a8531d7e761314770cbd1285c5f5343b..1f876006d826bdec2c968c7a0928d22d3e2131d6 100644 |
| --- a/sdk/lib/io/io_sink.dart |
| +++ b/sdk/lib/io/io_sink.dart |
| @@ -29,14 +29,61 @@ abstract class IOSink implements StreamSink<List<int>>, StringSink { |
| Encoding encoding; |
| /** |
| - * Writes the bytes uninterpreted to the consumer. While the call is |
| - * synchronous, the data may be buffered until the underlying resource is |
| - * ready. The data should not be modified after a call to [add]. |
| + * Writes the bytes uninterpreted to the consumer. |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
Adds [data] to the target consumer, ignoring [enco
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * |
| + * This function can not be called, when a stream is currently being added by |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
can not -> must not
remove comma
added by -> added
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * [addStream]. |
| + * |
| + * This operation is non-blocking. See [flush] or [done] for how to get any |
| + * errors that this call may have generated. The data should not be modified |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
that this call may have generated -> generated by
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * after a call to [add]. |
| */ |
| void add(List<int> data); |
| /** |
| + * Converts [obj] to a String by invoking [Object.toString] and |
| + * [add]s the result to the consumer. |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
adds the result -> adds the encoding of the result
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * |
| + * This operation is non-blocking. See [flush] or [done] for how to get any |
| + * errors that this call may have generated. |
| + */ |
| + void write(Object obj); |
| + |
| + /** |
| + * Iterates over the given [objects] and [write]s them in sequence. |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
If [separator] is provided, a `write` with the `se
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * |
| + * This operation is non-blocking. See [flush] or [done] for how to get any |
| + * errors that this call may have generated. |
| + */ |
| + void writeAll(Iterable objects, [String separator = ""]); |
| + |
| + /** |
| + * Converts [obj] to a String by invoking [Object.toString] and |
| + * adds the result to `this`, followed by a newline. |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
adds -> writes
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * |
| + * This operation is non-blocking. See [flush] or [done] for how to get any |
| + * errors that this call may have generated. |
| + */ |
| + void writeln([Object obj = ""]); |
| + |
| + /** |
| + * Writes the [charCode] to `this`. |
| + * |
| + * This method is equivalent to `write(new String.fromCharCode(charCode))`. |
| + * |
| + * This operation is non-blocking. See [flush] or [done] for how to get any |
| + * errors that this call may have generated. |
| + */ |
| + void writeCharCode(int charCode); |
| + |
| + /** |
| * Writes an error to the consumer. |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
Passes the error to the target consumer as an erro
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * |
| + * This function can not be called, when a stream is currently being added by |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
can not -> must not
remove comma.
added by -> adde
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * [addStream]. |
| + * |
| + * This operation is non-blocking. See [flush] or [done] for how to get any |
| + * errors that this call may have generated. |
| */ |
| void addError(error, [StackTrace stackTrace]); |
| @@ -57,13 +104,14 @@ abstract class IOSink implements StreamSink<List<int>>, StringSink { |
| Future flush(); |
| /** |
| - * Close the target. |
| + * Close the consumer. |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
Close the target consumer.
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| */ |
| Future close(); |
| /** |
| - * Get a future that will complete when all synchronous have completed, or an |
| - * error happened. This future is identical to the future returned from close. |
| + * Get a future that will complete when the consumer is closed, or an |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
is closed -> closes
or an error happened -> or whe
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * error happened. This future is identical to the future returned from |
|
Lasse Reichstein Nielsen
2014/03/18 11:57:14
returned from -> returned by.
Anders Johnsen
2014/03/18 12:30:57
Done.
|
| + * [close]. |
| */ |
| Future get done; |
| } |