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

Unified Diff: runtime/bin/string_stream.dart

Issue 10938010: Switch from interfaces to abstract classes in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Add test binaries. Created 8 years, 3 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 | « runtime/bin/socket_stream.dart ('k') | runtime/bin/websocket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/string_stream.dart
diff --git a/runtime/bin/string_stream.dart b/runtime/bin/string_stream.dart
index ce2be4b9a9c418d0a43f4fb4b642f2d88eddab8f..a5fa6ac000d43a625faf368aa97a025d3516b0ed 100644
--- a/runtime/bin/string_stream.dart
+++ b/runtime/bin/string_stream.dart
@@ -4,7 +4,7 @@
// Interface for decoders decoding binary data into string data. The
// decoder keeps track of line breaks during decoding.
-interface _StringDecoder {
+abstract class _StringDecoder {
// Add more binary data to be decoded. The ownership of the buffer
// is transfered to the decoder and the caller most not modify it any more.
int write(List<int> buffer);
@@ -245,7 +245,7 @@ class _Latin1Decoder extends _StringDecoderBase {
// Interface for encoders encoding string data into binary data.
-interface _StringEncoder {
+abstract class _StringEncoder {
List<int> encodeString(String string);
}
@@ -355,9 +355,7 @@ class EncoderException implements Exception {
class _StringInputStream implements StringInputStream {
- _StringInputStream(InputStream this._input,
- [Encoding encoding = Encoding.UTF_8])
- : _encoding = encoding {
+ _StringInputStream(InputStream this._input, Encoding this._encoding) {
_decoder = _StringDecoders.decoder(encoding);
_input.onData = _onData;
_input.onClosed = _onClosed;
« no previous file with comments | « runtime/bin/socket_stream.dart ('k') | runtime/bin/websocket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698