Helper class to wrap a StreamConsumer> and provide
utility functions for writing to the StreamConsumer directly. The
IOSink buffers the input given by all StringSink methods and will delay
an addStream until the buffer is flushed.
Helper class to wrap a StreamConsumer<List<int>> and provide utility functions for writing to the StreamConsumer directly. The IOSink buffers the input given by all StringSink methods and will delay an addStream until the buffer is flushed.
When the IOSink is bound to a stream (through addStream) any call to the IOSink will throw a StateError. When the addStream completes, the IOSink will again be open for all calls.
If data is added to the IOSink after the sink is closed, the data will be ignored. Use the done future to be notified when the IOSink is closed.