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

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: 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
Index: runtime/bin/string_stream.dart
diff --git a/runtime/bin/string_stream.dart b/runtime/bin/string_stream.dart
index 12f09df2a4ed43139fde6825e0be54220832b18a..450478c6256bcd0a143a2729536b2b27dc4838ba 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);
@@ -235,7 +235,7 @@ class _Latin1Decoder extends _StringDecoderBase {
// Interface for encoders encoding string data into binary data.
-interface _StringEncoder {
+abstract class _StringEncoder {
List<int> encodeString(String string);
}
@@ -345,9 +345,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;

Powered by Google App Engine
This is Rietveld 408576698