OLD | NEW |
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 if (string.isEmpty) return; | 378 if (string.isEmpty) return; |
379 _ioSink.write(string); | 379 _ioSink.write(string); |
380 } | 380 } |
381 | 381 |
382 void writeAll(Iterable objects, [String separator = ""]) { | 382 void writeAll(Iterable objects, [String separator = ""]) { |
383 bool isFirst = true; | 383 bool isFirst = true; |
384 for (Object obj in objects) { | 384 for (Object obj in objects) { |
385 if (isFirst) { | 385 if (isFirst) { |
386 isFirst = false; | 386 isFirst = false; |
387 } else { | 387 } else { |
388 if (separator != "") write(separator); | 388 if (!separator.isEmpty) write(separator); |
389 } | 389 } |
390 write(obj); | 390 write(obj); |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 void writeln([Object obj = ""]) { | 394 void writeln([Object obj = ""]) { |
395 write(obj); | 395 write(obj); |
396 write("\n"); | 396 write("\n"); |
397 } | 397 } |
398 | 398 |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 | 1820 |
1821 | 1821 |
1822 class _RedirectInfo implements RedirectInfo { | 1822 class _RedirectInfo implements RedirectInfo { |
1823 const _RedirectInfo(int this.statusCode, | 1823 const _RedirectInfo(int this.statusCode, |
1824 String this.method, | 1824 String this.method, |
1825 Uri this.location); | 1825 Uri this.location); |
1826 final int statusCode; | 1826 final int statusCode; |
1827 final String method; | 1827 final String method; |
1828 final Uri location; | 1828 final Uri location; |
1829 } | 1829 } |
OLD | NEW |