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

Unified Diff: sdk/lib/io/io_sink.dart

Issue 22872012: Remove Encoding-enum from dart:io and add interface in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/process.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/io_sink.dart
diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart
index b954a86d5ffeed71ac9f0e15677613193ed04251..ac4ce0a1daabeeece9aa0e78da3e55533a5750cf 100644
--- a/sdk/lib/io/io_sink.dart
+++ b/sdk/lib/io/io_sink.dart
@@ -19,7 +19,7 @@ part of dart.io;
*/
abstract class IOSink implements StreamSink<List<int>>, StringSink {
factory IOSink(StreamConsumer<List<int>> target,
- {Encoding encoding: Encoding.UTF_8})
+ {Encoding encoding: UTF8})
=> new _IOSinkImpl(target, encoding);
/**
@@ -204,7 +204,7 @@ class _IOSinkImpl extends _StreamSinkImpl<List<int>> implements IOSink {
}
}
if (string.isEmpty) return;
- add(_encodeString(string, _encoding));
+ add(_encoding.encode(string));
}
void writeAll(Iterable objects, [String separator = ""]) {
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/process.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698