add method
Adds data
to the sink.
Must not be called after a call to close.
Implementation
@override
void add(T data) {
if (_isClosed) {
throw StateError('Chunked data sink already closed');
}
if (buffering != 0) {
this.data = join(this.data, data);
} else {
start = end;
this.data = data;
}
end = start + getLength(this.data);
sleep = false;
while (!sleep) {
final h = _handler;
_handler = null;
if (h == null) {
break;
}
h();
}
if (buffering == 0) {
//
}
}