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

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

Issue 12870003: Make argument to StringSink.writeln optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix. Created 7 years, 9 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/core/string_sink.dart ('k') | sdk/lib/io/io_sink.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 class _HttpIncoming extends Stream<List<int>> { 7 class _HttpIncoming extends Stream<List<int>> {
8 final int _transferLength; 8 final int _transferLength;
9 final Completer _dataCompleter = new Completer(); 9 final Completer _dataCompleter = new Completer();
10 Stream<List<int>> _stream; 10 Stream<List<int>> _stream;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 } 373 }
374 if (string.isEmpty) return; 374 if (string.isEmpty) return;
375 _ioSink.write(string); 375 _ioSink.write(string);
376 } 376 }
377 377
378 void writeAll(Iterable objects) { 378 void writeAll(Iterable objects) {
379 for (Object obj in objects) write(obj); 379 for (Object obj in objects) write(obj);
380 } 380 }
381 381
382 void writeln(Object obj) { 382 void writeln([Object obj = ""]) {
383 write(obj); 383 write(obj);
384 write("\n"); 384 write("\n");
385 } 385 }
386 386
387 void writeCharCode(int charCode) { 387 void writeCharCode(int charCode) {
388 write(new String.fromCharCode(charCode)); 388 write(new String.fromCharCode(charCode));
389 } 389 }
390 390
391 void writeBytes(List<int> data) { 391 void writeBytes(List<int> data) {
392 _writeHeaders(); 392 _writeHeaders();
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 } 1574 }
1575 1575
1576 Encoding get encoding => _socket.encoding; 1576 Encoding get encoding => _socket.encoding;
1577 1577
1578 void set encoding(Encoding value) { 1578 void set encoding(Encoding value) {
1579 _socket.encoding = value; 1579 _socket.encoding = value;
1580 } 1580 }
1581 1581
1582 void write(Object obj) => _socket.write(obj); 1582 void write(Object obj) => _socket.write(obj);
1583 1583
1584 void writeln(Object obj) => _socket.writeln(obj); 1584 void writeln([Object obj = ""]) => _socket.writeln(obj);
1585 1585
1586 void writeCharCode(int charCode) => _socket.writeCharCode(charCode); 1586 void writeCharCode(int charCode) => _socket.writeCharCode(charCode);
1587 1587
1588 void writeAll(Iterable objects) => _socket.writeAll(objects); 1588 void writeAll(Iterable objects) => _socket.writeAll(objects);
1589 1589
1590 void writeBytes(List<int> bytes) => _socket.writeBytes(bytes); 1590 void writeBytes(List<int> bytes) => _socket.writeBytes(bytes);
1591 1591
1592 Future<Socket> consume(Stream<List<int>> stream) { 1592 Future<Socket> consume(Stream<List<int>> stream) {
1593 return _socket.consume(stream); 1593 return _socket.consume(stream);
1594 } 1594 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 1720
1721 1721
1722 class _RedirectInfo implements RedirectInfo { 1722 class _RedirectInfo implements RedirectInfo {
1723 const _RedirectInfo(int this.statusCode, 1723 const _RedirectInfo(int this.statusCode,
1724 String this.method, 1724 String this.method,
1725 Uri this.location); 1725 Uri this.location);
1726 final int statusCode; 1726 final int statusCode;
1727 final String method; 1727 final String method;
1728 final Uri location; 1728 final Uri location;
1729 } 1729 }
OLDNEW
« no previous file with comments | « sdk/lib/core/string_sink.dart ('k') | sdk/lib/io/io_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698