The internal type of the Java wrapped class.
The internal type of the Java wrapped class.
The internal instance of the Java wrapped class.
The internal instance of the Java wrapped class.
Close this org.vertx.scala.core.Closeable instance asynchronously and notifies the handler once done.
Close this org.vertx.scala.core.Closeable instance asynchronously and notifies the handler once done.
Close this org.vertx.scala.core.Closeable instance asynchronously.
Close this org.vertx.scala.core.Closeable instance asynchronously.
Set a data handler.
Set a data handler. As data is read, the handler will be called with the data.
Set a drain handler on the stream.
Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue has been reduced to maxSize / 2. See org.vertx.scala.core.streams.Pump for an example of this being used.
Set an end handler.
Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
Set an exception handler.
Set an exception handler.
Same as org.vertx.scala.core.file.AsyncFile.flush but the handler will be called when the flush is complete or if an error occurs
Flush any writes made to this file to underlying persistent storage.
Flush any writes made to this file to underlying persistent storage.
If the file was opened with flush
set to true
then calling this method will have no effect.
The actual flush will happen asynchronously.
Pause the ReadSupport
.
Pause the ReadSupport
. While it's paused, no data will be sent to the dataHandler
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
.
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.
Resume reading.
Resume reading. If the ReadSupport
has been paused, reading will recommence on it.
Set the maximum size of the write queue to maxSize
.
Set the maximum size of the write queue to maxSize
. You will still be able to write to the stream even
if there is more than maxSize
bytes in the write queue. This is used as an indicator by classes such as
Pump
to provide flow control.
Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types
Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types
Write a org.vertx.scala.core.buffer.Buffer to the file at position position
in the file, asynchronously.
Write a org.vertx.scala.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.
Write some data to the stream.
Write some data to the stream. The data is put on an internal write queue, and the write actually happens asynchronously. To avoid running out of memory by putting too much on the write queue, check the org.vertx.scala.core.streams.WriteStream.writeQueueFull() method before writing. This is done automatically if using a org.vertx.scala.core.streams.Pump.
This will return true
if there are more bytes in the write queue than the value set using
org.vertx.scala.core.streams.WriteStream.setWriteQueueMaxSize()
This will return true
if there are more bytes in the write queue than the value set using
org.vertx.scala.core.streams.WriteStream.setWriteQueueMaxSize()
Represents a file on the file-system which can be read from, or written to asynchronously.
This class also implements org.vertx.scala.core.streams.ReadStream and org.vertx.scala.core.streams.WriteStream. This allows the data to be pumped to and from other streams, e.g. an org.vertx.scala.core.http.HttpClientRequest instance, using the org.vertx.scala.core.streams.Pump class
Instances of AsyncFile are not thread-safe