implicit final class VertxAsyncFileOps extends AnyVal
- Alphabetic
- By Inheritance
- VertxAsyncFileOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new VertxAsyncFileOps(target: AsyncFile)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def closeL(): Task[Unit]
Close the file.
Close the file. The actual close happens asynchronously. The handler will be called when the close is complete, or an error occurs.
- def endL(): Task[Unit]
Close the file, see
#close(Handler). - def endL(data: Buffer): Task[Unit]
Same as
#end(T)but with anhandlercalled when the operation completes - def flushL(): Task[Unit]
Same as
#flushbut the handler will be called when the flush is complete or if an error occurs - def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def pipeToL(dst: WriteStream[Buffer]): Task[Unit]
Pipe this
ReadStreamto theWriteStream.Pipe this
ReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handlerwill be called with the result.- dst
the destination write stream
- def readL(buffer: Buffer, offset: Int, position: Long, length: Int): Task[Buffer]
Reads
lengthbytes of data from the file at positionpositionin the file, asynchronously.Reads
lengthbytes of data from the file at positionpositionin the file, asynchronously.The read data will be written into the specified
Buffer bufferat positionoffset.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.
- 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
- returns
a reference to this, so the API can be used fluently
- val target: AsyncFile
- def toString(): String
- Definition Classes
- Any
- def writeL(buffer: Buffer, position: Long): Task[Unit]
Write a
io.vertx.core.buffer.Bufferto the file at positionpositionin the file, asynchronously.Write a
io.vertx.core.buffer.Bufferto the file at positionpositionin the file, asynchronously.If
positionlies 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.
- buffer
the buffer to write
- position
the position in the file to write it at
- returns
a reference to this, so the API can be used fluently
- def writeL(data: Buffer): Task[Unit]
Same as
#write(Buffer)but with anhandlercalled when the operation completes