vertx / io.vertx.reactivex.core.file / AsyncFile / write

# write

`open fun write(data: Buffer): AsyncFile` `open fun write(buffer: Buffer, position: Long, handler: Handler<AsyncResult<Void>>): AsyncFile`

Write a io.vertx.reactivex.core.buffer.Buffer to the file at position `position` in the file, asynchronously.

If `position` lies outside of the current size of the file, the file will be enlarged to encompass it.

When multiple writes are invoked on the same file there are no guarantees as to order in which those writes actually occur

The handler will be called when the write is complete, or if an error occurs.

### Parameters

`buffer` - the buffer to write

`position` - the position in the file to write it at

`handler` - the handler to call when the write is complete

Return
a reference to this, so the API can be used fluently