Skip to content

okio / okio / ForwardingSource

ForwardingSource

(jvm) abstract class ForwardingSource :Source

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

Constructors

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

Properties

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

Functions

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

Inheritors

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