Implement streamWriteBuffer
Export streamWriteBuffer to userspace