startChunkedConversion method

ChunkedConversionSink<Object> startChunkedConversion(Sink<List<int>> sink)

Start a chunked conversion.

Only one object can be passed into the returned sink.

The argument sink will receive byte lists in sizes depending on the bufferSize passed to the constructor when creating this encoder.

Source

ChunkedConversionSink<Object> startChunkedConversion(Sink<List<int>> sink) {
  ByteConversionSink byteSink;
  if (sink is ByteConversionSink) {
    byteSink = sink;
  } else {
    byteSink = new ByteConversionSink.from(sink);
  }
  return new _JsonUtf8EncoderSink(
      byteSink, _toEncodable, _indent, _bufferSize);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-convert/JsonUtf8Encoder/startChunkedConversion.html