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

Side by Side Diff: runtime/bin/input_stream.dart

Issue 9662002: Prevent creation of additional FileMode and Encoding objects (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « runtime/bin/file.dart ('k') | no next file » | 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 */ 97 */
98 void set onError(void callback()); 98 void set onError(void callback());
99 } 99 }
100 100
101 101
102 /** 102 /**
103 * String encodings supported by [StringInputStream] and 103 * String encodings supported by [StringInputStream] and
104 * [StringOutputStream]. 104 * [StringOutputStream].
105 */ 105 */
106 class Encoding { 106 class Encoding {
107 static final Encoding UTF_8 = const Encoding("UTF-8"); 107 static final Encoding UTF_8 = const Encoding._internal("UTF-8");
108 static final Encoding ISO_8859_1 = const Encoding("ISO-8859-1"); 108 static final Encoding ISO_8859_1 = const Encoding._internal("ISO-8859-1");
109 static final Encoding ASCII = const Encoding("ASCII"); 109 static final Encoding ASCII = const Encoding._internal("ASCII");
110 const Encoding(String this.name); 110 const Encoding._internal(String this.name);
111 final String name; 111 final String name;
112 } 112 }
113 113
114 114
115 /** 115 /**
116 * A string input stream wraps a basic input stream and supplies 116 * A string input stream wraps a basic input stream and supplies
117 * string data. This data can be read either as string chunks or as 117 * string data. This data can be read either as string chunks or as
118 * lines separated by line termination character sequences. 118 * lines separated by line termination character sequences.
119 */ 119 */
120 interface StringInputStream default _StringInputStream { 120 interface StringInputStream default _StringInputStream {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 void set onError(void callback()); 240 void set onError(void callback());
241 } 241 }
242 242
243 243
244 class StreamException implements Exception { 244 class StreamException implements Exception {
245 const StreamException([String this.message = ""]); 245 const StreamException([String this.message = ""]);
246 const StreamException.streamClosed() : message = "Stream closed"; 246 const StreamException.streamClosed() : message = "Stream closed";
247 String toString() => "StreamException: $message"; 247 String toString() => "StreamException: $message";
248 final String message; 248 final String message;
249 } 249 }
OLDNEW
« no previous file with comments | « runtime/bin/file.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698