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

Side by Side Diff: sdk/lib/io/stdio.dart

Issue 14150002: Remove StreamSink(replaced by EventSink) and make IOSink extend EventSink. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « sdk/lib/io/io_sink.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 const int _STDIO_HANDLE_TYPE_TERMINAL = 0; 7 const int _STDIO_HANDLE_TYPE_TERMINAL = 0;
8 const int _STDIO_HANDLE_TYPE_PIPE = 1; 8 const int _STDIO_HANDLE_TYPE_PIPE = 1;
9 const int _STDIO_HANDLE_TYPE_FILE = 2; 9 const int _STDIO_HANDLE_TYPE_FILE = 2;
10 const int _STDIO_HANDLE_TYPE_SOCKET = 3; 10 const int _STDIO_HANDLE_TYPE_SOCKET = 3;
(...skipping 21 matching lines...) Expand all
32 32
33 _StdSink(IOSink this._sink); 33 _StdSink(IOSink this._sink);
34 34
35 Encoding get encoding => _sink.encoding; 35 Encoding get encoding => _sink.encoding;
36 void set encoding(Encoding encoding) { 36 void set encoding(Encoding encoding) {
37 _sink.encoding = encoding; 37 _sink.encoding = encoding;
38 } 38 }
39 void write(object) => _sink.write(object); 39 void write(object) => _sink.write(object);
40 void writeln([object = "" ]) => _sink.writeln(object); 40 void writeln([object = "" ]) => _sink.writeln(object);
41 void writeAll(objects, [sep = ""]) => _sink.writeAll(objects, sep); 41 void writeAll(objects, [sep = ""]) => _sink.writeAll(objects, sep);
42 void writeBytes(List<int> data) => _sink.writeBytes(data); 42 void add(List<int> data) => _sink.add(data);
43 void addError(AsyncError error) => _sink.addError(error);
43 void writeCharCode(int charCode) => _sink.writeCharCode(charCode); 44 void writeCharCode(int charCode) => _sink.writeCharCode(charCode);
44 Future consume(Stream<List<int>> stream) => _sink.consume(stream); 45 Future consume(Stream<List<int>> stream) => _sink.consume(stream);
45 Future addStream(Stream<List<int>> stream) => _sink.addStream(stream); 46 Future addStream(Stream<List<int>> stream) => _sink.addStream(stream);
46 Future writeStream(Stream<List<int>> stream) => _sink.writeStream(stream); 47 Future writeStream(Stream<List<int>> stream) => _sink.writeStream(stream);
47 Future close() => _sink.close(); 48 Future close() => _sink.close();
48 Future get done => _sink.done; 49 Future get done => _sink.done;
49 } 50 }
50 51
51 class StdioType { 52 class StdioType {
52 static const StdioType TERMINAL = const StdioType._("terminal"); 53 static const StdioType TERMINAL = const StdioType._("terminal");
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 116 }
116 return StdioType.OTHER; 117 return StdioType.OTHER;
117 } 118 }
118 119
119 120
120 class _StdIOUtils { 121 class _StdIOUtils {
121 external static IOSink _getStdioOutputStream(int fd); 122 external static IOSink _getStdioOutputStream(int fd);
122 external static Stream<List<int>> _getStdioInputStream(); 123 external static Stream<List<int>> _getStdioInputStream();
123 external static int _socketType(nativeSocket); 124 external static int _socketType(nativeSocket);
124 } 125 }
OLDNEW
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698