open class AsyncFile : ReadStream<Buffer>, WriteStream<Buffer>
Represents a file on the file-system which can be read from, or written to asynchronously.
This class also implements io.vertx.reactivex.core.streams.ReadStream and io.vertx.reactivex.core.streams.WriteStream. This allows the data to be pumped to and from other streams, e.g. an io.vertx.reactivex.core.http.HttpClientRequest instance, using the io.vertx.reactivex.core.streams.Pump class
NOTE: This class has been automatically generated from the io.vertx.core.file.AsyncFile non RX-ified interface using Vert.x codegen.
AsyncFile(delegate: AsyncFile) |
static val __TYPE_ARG: TypeArg<AsyncFile> |
open fun close(): Unit
Close the file. The actual close happens asynchronously. open fun close(handler: Handler<AsyncResult<Void>>): Unit
Close the file. The actual close happens asynchronously. The handler will be called when the close is complete, or an error occurs. |
|
open fun drainHandler(handler: Handler<Void>): AsyncFile |
|
open fun end(t: Buffer): Unit
Same as open fun end(): Unit
Close the file, see |
|
open fun endHandler(endHandler: Handler<Void>): AsyncFile |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): AsyncFile |
|
open fun flush(): AsyncFile
Flush any writes made to this file to underlying persistent storage. If the file was opened with The actual flush will happen asynchronously. open fun flush(handler: Handler<AsyncResult<Void>>): AsyncFile
Same as |
|
open fun getDelegate(): AsyncFile |
|
open fun handler(handler: Handler<Buffer>): AsyncFile |
|
open fun hashCode(): Int |
|
open static fun newInstance(arg: AsyncFile): AsyncFile |
|
open fun pause(): AsyncFile |
|
open fun read(buffer: Buffer, offset: Int, position: Long, length: Int, handler: Handler<AsyncResult<Buffer>>): AsyncFile
Reads The read data will be written into the specified 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. |
|
open fun resume(): AsyncFile |
|
open fun rxClose(): Completable
Close the file. The actual close happens asynchronously. The handler will be called when the close is complete, or an error occurs. |
|
open fun rxFlush(): Completable
Same as |
|
open fun rxRead(buffer: Buffer, offset: Int, position: Long, length: Int): Single<Buffer>
Reads The read data will be written into the specified 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. |
|
open fun rxWrite(buffer: Buffer, position: Long): Completable
Write a io.vertx.reactivex.core.buffer.Buffer to the file at position If 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. |
|
open fun setReadBufferSize(readBufferSize: Int): AsyncFile
Sets the buffer size that will be used to read the data from the file. Changing this value will impact how much the data will be read at a time from the file system. |
|
open fun setReadPos(readPos: Long): AsyncFile
Sets the position from which data will be read from when using the file as a io.vertx.reactivex.core.streams.ReadStream. |
|
open fun setWritePos(writePos: Long): AsyncFile
Sets the position from which data will be written when using the file as a io.vertx.reactivex.core.streams.WriteStream. |
|
open fun setWriteQueueMaxSize(maxSize: Int): AsyncFile |
|
open fun toFlowable(): Flowable<Buffer> |
|
open fun toObservable(): Observable<Buffer> |
|
open fun toString(): String |
|
open fun write(data: Buffer): AsyncFileopen fun write(buffer: Buffer, position: Long, handler: Handler<AsyncResult<Void>>): AsyncFile
Write a io.vertx.reactivex.core.buffer.Buffer to the file at position If 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. |
|
open fun writeQueueFull(): Boolean
This will return |