A generic destination for data.

Multiple data values can be put into a sink, and when no more data is available, the sink should be closed.

This is a generic interface that other data receivers can implement.

Implemented by




add(T data) → void

Put the data into the sink.

close() → void

Tell the sink that no further data will be added.