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

rxRead

open fun rxRead(buffer: Buffer, offset: Int, position: Long, length: Int): Single<Buffer>

Reads length bytes of data from the file at position position in the file, asynchronously.

The read data will be written into the specified Buffer buffer at position offset.

If data is read past the end of the file then zero bytes will be read.

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

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

Parameters

buffer - the buffer to read into

offset - the offset into the buffer where the data will be read

position - the position in the file where to start reading

length - the number of bytes to read

Return