Write all data into sink.