okio / okio / ForwardingSink


(jvm) abstract class ForwardingSink :Sink

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


Name Summary
(jvm) <init> A Sink which forwards calls to another. Useful for subclassing.ForwardingSink(delegate:Sink)


Name Summary
(jvm) delegate Sink to which this instance is delegating.val delegate:Sink


Name Summary
(jvm) close open fun close():Unit
(jvm) delegate fun ~~delegate~~():Sink
(jvm) flush open fun flush():Unit
(jvm) timeout open fun timeout():Timeout
(jvm) toString open fun toString():String
(jvm) write open fun write(source:Buffer, byteCount:Long):Unit

Extension Functions

Name Summary
(jvm) deflate Returns an DeflaterSink that DEFLATE-compresses data to this Sink while writing.funSink.deflate(deflater:Deflater= Deflater()):DeflaterSink
(jvm) gzip Returns a GzipSink that gzip-compresses to this Sink while writing.funSink.gzip():GzipSink


Name Summary
(jvm) HashingSink A sink that computes a hash of the full stream of bytes it has accepted. To use, create an instance with your preferred hash algorithm. Write all of the data to the sink and then call hash to compute the final hash value.class HashingSink :ForwardingSink