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 |
9 /** | 19 /** |
10 * A [ChunkedConversionSink] is used to transmit data more efficiently between | 20 * A [ChunkedConversionSink] is used to transmit data more efficiently between |
11 * two converters during chunked conversions. | 21 * two converters during chunked conversions. |
12 * | 22 * |
13 * The basic `ChunkedConversionSink` is just a [Sink], and converters should | 23 * The basic `ChunkedConversionSink` is just a [Sink], and converters should |
14 * work with a plain `Sink`, but may work more efficiently with certain | 24 * work with a plain `Sink`, but may work more efficiently with certain |
15 * specialized types of `ChunkedConversionSink`. | 25 * specialized types of `ChunkedConversionSink`. |
16 * | 26 * |
17 * It is recommended that implementations of `ChunkedConversionSink` extend | 27 * It is recommended that implementations of `ChunkedConversionSink` extend |
18 * this class, to inherit any further methods that may be added to the class. | 28 * 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... |
87 } | 97 } |
88 | 98 |
89 void addError(Object error, [StackTrace stackTrace]) { | 99 void addError(Object error, [StackTrace stackTrace]) { |
90 _eventSink.addError(error, stackTrace); | 100 _eventSink.addError(error, stackTrace); |
91 } | 101 } |
92 | 102 |
93 void close() { | 103 void close() { |
94 _chunkedSink.close(); | 104 _chunkedSink.close(); |
95 } | 105 } |
96 } | 106 } |
OLD | NEW |