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

Side by Side Diff: tests/standalone/io/stream_buffer_test.dart

Issue 10836177: Add StreamBuffer to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase, without changes. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/stream_buffer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #import("dart:io");
2 #import("dart:isolate");
3 #import("dart:math");
4
5 #source("stream_buffer.dart");
6
7 void main() {
8 var buffer = new StreamBuffer();
9 var out = buffer.toBuffer;
10 var een = buffer.fromBuffer;
11 een.onData = () {
12 var first = new List<int>(6);
13 een.readInto(first, 1, 4);
14 print(first);
15 een.onData = () {
16 var data = een.read(2);
17 print(data);
18 };
19 };
20 een.onClosed = () {
21 print('buffer closed');
22 };
23
24 out.write([23, 17, 19]);
25 out.write([27, 35]);
26 out.write([56, 98]);
27 out.close();
28 }
OLDNEW
« no previous file with comments | « runtime/bin/stream_buffer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698