StandardStreams

The standard input, output, and error streams.

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion
Link copied to clipboard

Functions

Link copied to clipboard
expect open override fun close()
actual open override fun close()
actual open override fun close()
Link copied to clipboard
expect fun interruptInputRead()

Signal blocking calls to readInput or readInputWithTimeout to wake up and return 0.

actual fun interruptInputRead()
actual fun interruptInputRead()
Link copied to clipboard
expect fun isErrorTty(): Boolean

True if the error is connected to the TTY.

actual fun isErrorTty(): Boolean
actual fun isErrorTty(): Boolean
Link copied to clipboard
expect fun isInputTty(): Boolean

True if the input is connected to the TTY.

actual fun isInputTty(): Boolean
actual fun isInputTty(): Boolean
Link copied to clipboard
expect fun isOutputTty(): Boolean

True if the output is connected to the TTY.

actual fun isOutputTty(): Boolean
actual fun isOutputTty(): Boolean
Link copied to clipboard
expect fun readInput(buffer: ByteArray, offset: Int, count: Int): Int

Read up to count bytes into buffer at offset from the input stream. The number of bytes read will be returned. 0 will be returned if interruptInputRead is called while waiting for data.

actual fun readInput(buffer: ByteArray, offset: Int, count: Int): Int
actual fun readInput(buffer: ByteArray, offset: Int, count: Int): Int
Link copied to clipboard
expect fun readInputWithTimeout(buffer: ByteArray, offset: Int, count: Int, timeoutMillis: Int): Int

Read up to count bytes into buffer at offset from the input stream. The number of bytes read will be returned. 0 will be returned if interruptInputRead is called while waiting for data, or if at least timeoutMillis have passed without data.

actual fun readInputWithTimeout(buffer: ByteArray, offset: Int, count: Int, timeoutMillis: Int): Int
actual fun readInputWithTimeout(buffer: ByteArray, offset: Int, count: Int, timeoutMillis: Int): Int
Link copied to clipboard
expect fun writeError(buffer: ByteArray, offset: Int, count: Int): Int

Write up to count bytes from buffer at offset to the error stream. The number of bytes written will be returned.

actual fun writeError(buffer: ByteArray, offset: Int, count: Int): Int
actual fun writeError(buffer: ByteArray, offset: Int, count: Int): Int
Link copied to clipboard
expect fun writeOutput(buffer: ByteArray, offset: Int, count: Int): Int

Write up to count bytes from buffer at offset to the output stream. The number of bytes written will be returned.

actual fun writeOutput(buffer: ByteArray, offset: Int, count: Int): Int
actual fun writeOutput(buffer: ByteArray, offset: Int, count: Int): Int