Skip to content

okio / okio / ForwardingSource


(jvm) abstract class ForwardingSource :Source

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


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


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


Name Summary
(jvm) close open fun close():Unit
(jvm) delegate fun ~~delegate~~():Source
(jvm) read open fun read(sink:Buffer, byteCount:Long):Long
(jvm) timeout open fun timeout():Timeout
(jvm) toString open fun toString():String

Extension Functions

Name Summary
(jvm) gzip Returns a GzipSource that gzip-decompresses this Source while reading.funSource.gzip():GzipSource
(jvm) inflate Returns an InflaterSource that DEFLATE-decompresses this Source while reading.funSource.inflate(inflater:Inflater= Inflater()):InflaterSource


Name Summary
(jvm) HashingSource A source that computes a hash of the full stream of bytes it has supplied. To use, create an instance with your preferred hash algorithm. Exhaust the source by reading all of its bytes and then call hash to compute the final hash value.class HashingSource :ForwardingSource