add method

void add (String chunk)
override

Adds chunked data to this sink.

This method is also used when converters are used as StreamTransformers.

Implementation

void add(String chunk) {
  if (_isClosed) {
    throw new StateError("Can't add to a closed sink.");
  }

  _buffer.write(chunk);
}