sink

fun OutputStream.sink(): Sink

Returns a sink that writes to out.

fun Socket.sink(): Sink

Returns a sink that writes to socket. Prefer this over sink because this method honors timeouts. When the socket write times out, the socket is asynchronously closed by a watchdog thread.

fun File.sink(append: Boolean = false): Sink

Returns a sink that writes to file.

@IgnoreJRERequirement()
fun Path.sink(vararg options: OpenOption): Sink

Returns a source that reads from path.