on Close
Wraps this channel to execute the provided action when closed using flushAndClose().
Return
A new ByteWriteChannel that executes the given action upon closure.
Parameters
on Close
The action to execute when the channel is closed.