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

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

Issue 46663003: Fix sdk/lib/io errors found by the analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More fixes. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/secure_server_socket.dart ('k') | sdk/lib/io/string_transformer.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 _StdSink(IOSink this._sink); 155 _StdSink(IOSink this._sink);
156 156
157 Encoding get encoding => _sink.encoding; 157 Encoding get encoding => _sink.encoding;
158 void set encoding(Encoding encoding) { 158 void set encoding(Encoding encoding) {
159 _sink.encoding = encoding; 159 _sink.encoding = encoding;
160 } 160 }
161 void write(object) => _sink.write(object); 161 void write(object) => _sink.write(object);
162 void writeln([object = "" ]) => _sink.writeln(object); 162 void writeln([object = "" ]) => _sink.writeln(object);
163 void writeAll(objects, [sep = ""]) => _sink.writeAll(objects, sep); 163 void writeAll(objects, [sep = ""]) => _sink.writeAll(objects, sep);
164 void add(List<int> data) => _sink.add(data); 164 void add(List<int> data) => _sink.add(data);
165 void addError(error) => _sink.addError(error); 165 void addError(error, [StackTrace stackTrace]) =>
166 _sink.addError(error, stackTrace);
166 void writeCharCode(int charCode) => _sink.writeCharCode(charCode); 167 void writeCharCode(int charCode) => _sink.writeCharCode(charCode);
167 Future addStream(Stream<List<int>> stream) => _sink.addStream(stream); 168 Future addStream(Stream<List<int>> stream) => _sink.addStream(stream);
168 Future close() => _sink.close(); 169 Future close() => _sink.close();
169 Future get done => _sink.done; 170 Future get done => _sink.done;
170 } 171 }
171 172
172 class StdioType { 173 class StdioType {
173 static const StdioType TERMINAL = const StdioType._("terminal"); 174 static const StdioType TERMINAL = const StdioType._("terminal");
174 static const StdioType PIPE = const StdioType._("pipe"); 175 static const StdioType PIPE = const StdioType._("pipe");
175 static const StdioType FILE = const StdioType._("file"); 176 static const StdioType FILE = const StdioType._("file");
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 237 }
237 return StdioType.OTHER; 238 return StdioType.OTHER;
238 } 239 }
239 240
240 241
241 class _StdIOUtils { 242 class _StdIOUtils {
242 external static IOSink _getStdioOutputStream(int fd); 243 external static IOSink _getStdioOutputStream(int fd);
243 external static Stdin _getStdioInputStream(); 244 external static Stdin _getStdioInputStream();
244 external static int _socketType(nativeSocket); 245 external static int _socketType(nativeSocket);
245 } 246 }
OLDNEW
« no previous file with comments | « sdk/lib/io/secure_server_socket.dart ('k') | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698