| OLD | NEW |
| 1 part of dart.convert; | 1 part of dart.convert; |
| 2 abstract class StringConversionSink extends ChunkedConversionSink<String> {Stri
ngConversionSink(); | 2 abstract class StringConversionSink extends ChunkedConversionSink<String> {Stri
ngConversionSink(); |
| 3 factory StringConversionSink.withCallback(void callback(String accumulated)) =
_StringCallbackSink; | 3 factory StringConversionSink.withCallback(void callback(String accumulated)) =
_StringCallbackSink; |
| 4 factory StringConversionSink.from(Sink<String> sink) = _StringAdapterSink; | 4 factory StringConversionSink.from(Sink<String> sink) = _StringAdapterSink; |
| 5 factory StringConversionSink.fromStringSink(StringSink sink) = _StringSinkConve
rsionSink; | 5 factory StringConversionSink.fromStringSink(StringSink sink) = _StringSinkConve
rsionSink; |
| 6 void addSlice(String chunk, int start, int end, bool isLast); | 6 void addSlice(String chunk, int start, int end, bool isLast); |
| 7 ByteConversionSink asUtf8Sink(bool allowMalformed); | 7 ByteConversionSink asUtf8Sink(bool allowMalformed); |
| 8 ClosableStringSink asStringSink(); | 8 ClosableStringSink asStringSink(); |
| 9 } | 9 } |
| 10 abstract class ClosableStringSink extends StringSink {factory ClosableStringSin
k.fromStringSink(StringSink sink, void onClose()) = _ClosableStringSink; | 10 abstract class ClosableStringSink extends StringSink {factory ClosableStringSin
k.fromStringSink(StringSink sink, void onClose()) = _ClosableStringSink; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 void writeln([Object o = ""]) { | 40 void writeln([Object o = ""]) { |
| 41 _buffer.writeln(o); | 41 _buffer.writeln(o); |
| 42 if (_buffer.length > _MIN_STRING_SIZE) _flush(); | 42 if (_buffer.length > _MIN_STRING_SIZE) _flush(); |
| 43 } | 43 } |
| 44 void writeAll(Iterable objects, [String separator = ""]) { | 44 void writeAll(Iterable objects, [String separator = ""]) { |
| 45 if (_buffer.isNotEmpty) _flush(); | 45 if (_buffer.isNotEmpty) _flush(); |
| 46 Iterator iterator = objects.iterator; | 46 Iterator iterator = objects.iterator; |
| 47 if (!iterator.moveNext()) return; if (separator.isEmpty) { | 47 if (!iterator.moveNext()) return; if (separator.isEmpty) { |
| 48 do { | 48 do { |
| 49 _chunkedSink.add(((__x15) => DEVC$RT.cast(__x15, dynamic, String, "DynamicCast",
"""line 147, column 26 of dart:convert/string_conversion.dart: """, __x15 is St
ring, true))(iterator.current.toString())); | 49 _chunkedSink.add(iterator.current.toString()); |
| 50 } | 50 } |
| 51 while (iterator.moveNext());} | 51 while (iterator.moveNext());} |
| 52 else { | 52 else { |
| 53 _chunkedSink.add(((__x16) => DEVC$RT.cast(__x16, dynamic, String, "DynamicCast",
"""line 150, column 24 of dart:convert/string_conversion.dart: """, __x16 is St
ring, true))(iterator.current.toString())); | 53 _chunkedSink.add(iterator.current.toString()); |
| 54 while (iterator.moveNext()) { | 54 while (iterator.moveNext()) { |
| 55 write(separator); | 55 write(separator); |
| 56 _chunkedSink.add(((__x17) => DEVC$RT.cast(__x17, dynamic, String, "DynamicCast"
, """line 153, column 26 of dart:convert/string_conversion.dart: """, __x17 is S
tring, true))(iterator.current.toString())); | 56 _chunkedSink.add(iterator.current.toString()); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 void _flush() { | 60 void _flush() { |
| 61 String accumulated = _buffer.toString(); | 61 String accumulated = _buffer.toString(); |
| 62 _buffer.clear(); | 62 _buffer.clear(); |
| 63 _chunkedSink.add(accumulated); | 63 _chunkedSink.add(accumulated); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 abstract class StringConversionSinkBase extends StringConversionSinkMixin {} | 66 abstract class StringConversionSinkBase extends StringConversionSinkMixin {} |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 void addSlice(List<int> chunk, int startIndex, int endIndex, bool isLast) { | 160 void addSlice(List<int> chunk, int startIndex, int endIndex, bool isLast) { |
| 161 _decoder.convert(chunk, startIndex, endIndex); | 161 _decoder.convert(chunk, startIndex, endIndex); |
| 162 if (_buffer.isNotEmpty) { | 162 if (_buffer.isNotEmpty) { |
| 163 String accumulated = _buffer.toString(); | 163 String accumulated = _buffer.toString(); |
| 164 _chunkedSink.addSlice(accumulated, 0, accumulated.length, isLast); | 164 _chunkedSink.addSlice(accumulated, 0, accumulated.length, isLast); |
| 165 _buffer.clear(); | 165 _buffer.clear(); |
| 166 return;} | 166 return;} |
| 167 if (isLast) close(); | 167 if (isLast) close(); |
| 168 } | 168 } |
| 169 } | 169 } |
| OLD | NEW |