IOSink 构造函数

IOSink(
  1. StreamConsumer<List<int>> target,
  2. {Encoding encoding = utf8}
)

创建一个输出到以字节为单位的目标IOSinktarget StreamConsumer.

写入到StreamSink方法的文本将被编码成字节,并用encoding输出到target

实现

factory IOSink(StreamConsumer<List<int>> target,
        {Encoding encoding = utf8}) =>
    new _IOSinkImpl(target, encoding);