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

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

Issue 12313057: Remove old InputStream and OutputStream classes from dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/string_stream.dart ('k') | tests/standalone/io/file_test.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 /** 7 /**
8 * String encodings.
9 */
10 class Encoding {
11 static const Encoding UTF_8 = const Encoding._internal("UTF-8");
12 static const Encoding ISO_8859_1 = const Encoding._internal("ISO-8859-1");
13 static const Encoding ASCII = const Encoding._internal("ASCII");
14 /**
15 * SYSTEM encoding is the current code page on Windows and UTF-8 on
16 * Linux and Mac.
17 */
18 static const Encoding SYSTEM = const Encoding._internal("SYSTEM");
19 const Encoding._internal(String this.name);
20 final String name;
21 }
22
23
24 /**
8 * Stream transformer that can decode a stream of bytes into a stream of 25 * Stream transformer that can decode a stream of bytes into a stream of
9 * strings using [encoding]. 26 * strings using [encoding].
10 * 27 *
11 * Invalid or forbidden byte-sequences will not produce errors, but will instead 28 * Invalid or forbidden byte-sequences will not produce errors, but will instead
12 * insert [replacementChar] in the decoded strings. 29 * insert [replacementChar] in the decoded strings.
13 */ 30 */
14 class StringDecoder implements StreamTransformer<List<int>, String> { 31 class StringDecoder implements StreamTransformer<List<int>, String> {
15 var _decoder; 32 var _decoder;
16 33
17 /** 34 /**
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 _subscription.resume(); 405 _subscription.resume();
389 } 406 }
390 } 407 }
391 408
392 void _subscriptionChanged() { 409 void _subscriptionChanged() {
393 if (!_controller.hasSubscribers) { 410 if (!_controller.hasSubscribers) {
394 _subscription.cancel(); 411 _subscription.cancel();
395 } 412 }
396 } 413 }
397 } 414 }
OLDNEW
« no previous file with comments | « sdk/lib/io/string_stream.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698