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

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

Issue 11475026: By default use current code page on Windows for decoding string (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment Created 8 years 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/_internal/compiler/implementation/lib/io_patch.dart ('k') | sdk/lib/io/process.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Basic input stream which supplies binary data. 6 * Basic input stream which supplies binary data.
7 * 7 *
8 * Input streams are used to read data sequentially from some data 8 * Input streams are used to read data sequentially from some data
9 * source. All input streams are non-blocking. They each have a number 9 * source. All input streams are non-blocking. They each have a number
10 * of read calls which will always return without any IO related 10 * of read calls which will always return without any IO related
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 98
99 /** 99 /**
100 * String encodings. 100 * String encodings.
101 */ 101 */
102 class Encoding { 102 class Encoding {
103 static const Encoding UTF_8 = const Encoding._internal("UTF-8"); 103 static const Encoding UTF_8 = const Encoding._internal("UTF-8");
104 static const Encoding ISO_8859_1 = const Encoding._internal("ISO-8859-1"); 104 static const Encoding ISO_8859_1 = const Encoding._internal("ISO-8859-1");
105 static const Encoding ASCII = const Encoding._internal("ASCII"); 105 static const Encoding ASCII = const Encoding._internal("ASCII");
106 /**
107 * SYSTEM encoding is the current code page on Windows and UTF-8 on
108 * Linux and Mac.
109 */
110 static const Encoding SYSTEM = const Encoding._internal("SYSTEM");
106 const Encoding._internal(String this.name); 111 const Encoding._internal(String this.name);
107 final String name; 112 final String name;
108 } 113 }
109 114
110 115
111 /** 116 /**
112 * A string input stream wraps a basic input stream and supplies 117 * A string input stream wraps a basic input stream and supplies
113 * string data. This data can be read either as string chunks or as 118 * string data. This data can be read either as string chunks or as
114 * lines separated by line termination character sequences. 119 * lines separated by line termination character sequences.
115 */ 120 */
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 void set onError(void callback(e)); 247 void set onError(void callback(e));
243 } 248 }
244 249
245 250
246 class StreamException implements Exception { 251 class StreamException implements Exception {
247 const StreamException([String this.message = ""]); 252 const StreamException([String this.message = ""]);
248 const StreamException.streamClosed() : message = "Stream closed"; 253 const StreamException.streamClosed() : message = "Stream closed";
249 String toString() => "StreamException: $message"; 254 String toString() => "StreamException: $message";
250 final String message; 255 final String message;
251 } 256 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/io_patch.dart ('k') | sdk/lib/io/process.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698