interface ByteSink
source · line 21public
public interface ByteSink
A synchronous byte sink supporting short writes and explicit flushing.
Extensions
public fun ByteSink.writeText(text: String): Unit· scoop:scoop.platform:0.1.0public fun ByteSink.writeLine(text: String): Unit· scoop:scoop.platform:0.1.0public fun ByteSink.writeFrom(buffer: NativeByteBuffer): Long· scoop:scoop.platform:0.1.0public fun ByteSink.writeFrom(array: List<Byte>, offset: Long = 0L, count: Long = array.size - offset): Long· scoop:scoop.platform:0.1.0public fun ByteSink.queue(vararg commands: Command): Unit· scoop:scoop.terminal:0.1.0public fun ByteSink.execute(vararg commands: Command): Unit· scoop:scoop.terminal:0.1.0public fun ByteSink.writeFully(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Unit· scoop:scoop.platform:0.1.0public fun ByteSink.writeAllBytes(bytes: List<Byte>): Unit· scoop:scoop.platform:0.1.0
function flush
source · line 30public
public fun flush(): Unit
Flushes pending output according to the sink's buffering contract.
function writeFrom
source · line 26public
public fun writeFrom(buffer: NativeByteBuffer, count: Long): Long
Consumes the selected readable region, returning the actual accepted byte count and permitting short writes.
parameter buffer
source · line 26public
buffer: NativeByteBuffer
parameter count
source · line 26public
count: Long