Skip to content

//okio/okio/Sink

Sink

[jvm] interface Sink : Closeable, Flushable

Functions

Name Summary
close [jvm]
Content
abstract override fun close()


equals [jvm]
Content
open operator override fun equals(other: Any?): Boolean


flush [jvm]
Content
abstract override fun flush()


hashCode [jvm]
Content
open override fun hashCode(): Int


timeout [jvm]
Content
abstract fun timeout(): Timeout


toString [jvm]
Content
open override fun toString(): String


write [jvm]
Content
abstract fun write(source: Buffer, byteCount: Long)


Inheritors

Name
BufferedSink
CipherSink
DeflaterSink
ForwardingSink
GzipSink
HashingSink

Extensions

Name Summary
cipherSink [jvm]
Brief description
Returns a sink that uses cipher to encrypt or decrypt this.
Content
fun Sink.cipherSink(cipher: Cipher): CipherSink


deflate [jvm]
Brief description
Returns an DeflaterSink that DEFLATE-compresses data to this Sink while writing.
Content
inline fun Sink.deflate(deflater: Deflater): DeflaterSink


gzip [jvm]
Brief description
Returns a GzipSink that gzip-compresses to this Sink while writing.
Content
inline fun Sink.gzip(): GzipSink


hashingSink [jvm]
Brief description
Returns a sink that uses mac to hash this.
Content
fun Sink.hashingSink(mac: Mac): HashingSink


[jvm]
Brief description
Returns a sink that uses digest to hash this.
Content
fun Sink.hashingSink(digest: MessageDigest): HashingSink