| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.convert; | 5 part of dart.convert; |
| 6 | 6 |
| 7 typedef void _ChunkedConversionCallback<T>(T accumulated); | 7 typedef void _ChunkedConversionCallback<T>(T accumulated); |
| 8 | 8 |
| 9 /// This class is deprecated. Extend [Converter] directly. | |
| 10 @deprecated | |
| 11 abstract class ChunkedConverter<S, T, S2, T2> extends Converter<S, T> { | |
| 12 const ChunkedConverter() : super(); | |
| 13 | |
| 14 dynamic bind(dynamic other) => super.bind(other); | |
| 15 dynamic startChunkedConversion(dynamic sink) => | |
| 16 super.startChunkedConversion(sink); | |
| 17 } | |
| 18 | |
| 19 /** | 9 /** |
| 20 * A [ChunkedConversionSink] is used to transmit data more efficiently between | 10 * A [ChunkedConversionSink] is used to transmit data more efficiently between |
| 21 * two converters during chunked conversions. | 11 * two converters during chunked conversions. |
| 22 * | 12 * |
| 23 * The basic `ChunkedConversionSink` is just a [Sink], and converters should | 13 * The basic `ChunkedConversionSink` is just a [Sink], and converters should |
| 24 * work with a plain `Sink`, but may work more efficiently with certain | 14 * work with a plain `Sink`, but may work more efficiently with certain |
| 25 * specialized types of `ChunkedConversionSink`. | 15 * specialized types of `ChunkedConversionSink`. |
| 26 * | 16 * |
| 27 * It is recommended that implementations of `ChunkedConversionSink` extend | 17 * It is recommended that implementations of `ChunkedConversionSink` extend |
| 28 * this class, to inherit any further methods that may be added to the class. | 18 * this class, to inherit any further methods that may be added to the class. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 87 } |
| 98 | 88 |
| 99 void addError(Object error, [StackTrace stackTrace]) { | 89 void addError(Object error, [StackTrace stackTrace]) { |
| 100 _eventSink.addError(error, stackTrace); | 90 _eventSink.addError(error, stackTrace); |
| 101 } | 91 } |
| 102 | 92 |
| 103 void close() { | 93 void close() { |
| 104 _chunkedSink.close(); | 94 _chunkedSink.close(); |
| 105 } | 95 } |
| 106 } | 96 } |
| OLD | NEW |