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

Side by Side Diff: lib/src/byte_stream.dart

Issue 1580273002: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/http@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/base_response.dart ('k') | lib/src/client.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 library byte_stream;
6
7 import 'dart:async'; 5 import 'dart:async';
8 import 'dart:convert'; 6 import 'dart:convert';
9 import 'dart:typed_data'; 7 import 'dart:typed_data';
10 8
11 import 'utils.dart'; 9 import 'utils.dart';
12 10
13 /// A stream of chunks of bytes representing a single piece of data. 11 /// A stream of chunks of bytes representing a single piece of data.
14 class ByteStream extends StreamView<List<int>> { 12 class ByteStream extends StreamView<List<int>> {
15 ByteStream(Stream<List<int>> stream) 13 ByteStream(Stream<List<int>> stream)
16 : super(stream); 14 : super(stream);
(...skipping 14 matching lines...) Expand all
31 } 29 }
32 30
33 /// Collect the data of this stream in a [String], decoded according to 31 /// Collect the data of this stream in a [String], decoded according to
34 /// [encoding], which defaults to `UTF8`. 32 /// [encoding], which defaults to `UTF8`.
35 Future<String> bytesToString([Encoding encoding=UTF8]) => 33 Future<String> bytesToString([Encoding encoding=UTF8]) =>
36 encoding.decodeStream(this); 34 encoding.decodeStream(this);
37 35
38 Stream<String> toStringStream([Encoding encoding=UTF8]) => 36 Stream<String> toStringStream([Encoding encoding=UTF8]) =>
39 transform(encoding.decoder); 37 transform(encoding.decoder);
40 } 38 }
OLDNEW
« no previous file with comments | « lib/src/base_response.dart ('k') | lib/src/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698