Creates a data writer for the given stream, passes it to the given callback function, flushes the data writer and release the stream writer lock after callback execution.
The stream to write to.
The callback function to call with the created data writer as argument.
Optional
Optional data writer options.
Creates a data writer for the given stream, passes it to the given callback function, flushes the data writer and release the stream writer lock after callback execution.