Spec-Zone.ru › Dart 2

dart:convert

startChunkedConversion method

ChunkedConversionSink<Object?> startChunkedConversion(
  1. Sink<String> sink
)
override

Starts a chunked conversion.

The converter works more efficiently if the given sink is a StringConversionSink.

Returns a chunked-conversion sink that accepts at most one object. It is an error to invoke add more than once on the returned sink.

Implementation

ChunkedConversionSink<Object?> startChunkedConversion(Sink<String> sink) {
  if (sink is _Utf8EncoderSink) {
    return _JsonUtf8EncoderSink(
        sink._sink,
        _toEncodable,
        JsonUtf8Encoder._utf8Encode(indent),
        JsonUtf8Encoder._defaultBufferSize);
  }
  return _JsonEncoderSink(
      sink is StringConversionSink ? sink : StringConversionSink.from(sink),
      _toEncodable,
      indent);
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-convert/JsonEncoder/startChunkedConversion.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API