ForwardingSink

abstract class ForwardingSink(val delegate: Sink) : Sink

A Sink which forwards calls to another. Useful for subclassing.

Inheritors

Constructors

Link copied to clipboard
constructor(delegate: Sink)

Properties

Link copied to clipboard
@get:JvmName(name = "delegate")
val delegate: Sink

Sink to which this instance is delegating.

Functions

Link copied to clipboard

Returns a new sink that buffers writes to sink. The returned sink will batch writes to sink. Use this wherever you write to a sink to get an ergonomic and efficient access to data.

Link copied to clipboard

Returns a sink that uses cipher to encrypt or decrypt this.

Link copied to clipboard
open override fun close()
Link copied to clipboard
inline fun Sink.deflate(deflater: Deflater = Deflater()): DeflaterSink

Returns an DeflaterSink that DEFLATE-compresses data to this Sink while writing.

Link copied to clipboard
open override fun flush()
Link copied to clipboard
inline fun Sink.gzip(): GzipSink

Returns a GzipSink that gzip-compresses to this Sink while writing.

Link copied to clipboard

Returns a sink that uses digest to hash this.

Returns a sink that uses mac to hash this.

Link copied to clipboard
open override fun timeout(): Timeout
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun write(source: Buffer, byteCount: Long)