AsyncWriteStream

A stream for writing data asynchronously. All *Async function calls utilize Dispatchers.IO + NonCancellable context and simply call BufferedWriteStream blocking APIs.

NOTE: For Jvm & Android the kotlinx.coroutines.core dependency is needed when using Async functions.

See also

A stream for writing data asynchronously.

NOTE: For Jvm & Android the kotlinx.coroutines.core dependency is needed when using Async functions.

See also

A stream for writing data asynchronously.

See also

Functions

Link copied to clipboard
actual open override fun close()

Closes the resource releasing any system resources that may be allocated to this AsyncWriteStream. Subsequent invocations do nothing.

expect open override fun close()

Closes the resource releasing any system resources that may be allocated to this AsyncWriteStream. Subsequent invocations do nothing.

actual open override fun close()

Closes the resource releasing any system resources that may be allocated to this AsyncWriteStream. Subsequent invocations do nothing.

Link copied to clipboard
actual suspend fun closeAsync()

Closes the resource releasing any system resources that may be allocated to this AsyncWriteStream. Subsequent invocations do nothing.

expect suspend fun closeAsync()

Closes the resource releasing any system resources that may be allocated to this AsyncWriteStream. Subsequent invocations do nothing.

actual suspend fun closeAsync()

Closes the resource releasing any system resources that may be allocated to this AsyncWriteStream. Subsequent invocations do nothing.

Link copied to clipboard
actual open override fun flush()

Flushes any buffered data.

expect fun flush()

Flushes any buffered data.

actual fun flush()

Flushes any buffered data.

Link copied to clipboard
actual suspend fun flushAsync()

Flushes any buffered data.

expect suspend fun flushAsync()

Flushes any buffered data.

actual suspend fun flushAsync()

Flushes any buffered data.

Link copied to clipboard
expect fun write(buf: ByteArray)

Writes the entire contents of buf.

expect fun write(buf: ByteArray, offset: Int, len: Int)

Writes len number of bytes from buf, starting at index offset.

Link copied to clipboard
actual suspend fun writeAsync(buf: ByteArray)

Writes the entire contents of buf.

actual suspend fun writeAsync(buf: ByteArray, offset: Int, len: Int)

Writes len number of bytes from buf, starting at index offset.

expect suspend fun writeAsync(buf: ByteArray)

Writes the entire contents of buf.

expect suspend fun writeAsync(buf: ByteArray, offset: Int, len: Int)

Writes len number of bytes from buf, starting at index offset.

actual suspend fun writeAsync(buf: ByteArray)

Writes the entire contents of buf.

actual suspend fun writeAsync(buf: ByteArray, offset: Int, len: Int)

Writes len number of bytes from buf, starting at index offset.