read

expect abstract fun read(sink: ByteArray): Int

Removes up to sink.length bytes from this and copies them into sink. Returns the number of bytes read, or -1 if this source is exhausted.


expect abstract fun read(sink: ByteArray, offset: Int, byteCount: Int): Int

Removes up to byteCount bytes from this and copies them into sink at offset. Returns the number of bytes read, or -1 if this source is exhausted.

actual abstract fun read(sink: ByteArray): Int
actual abstract fun read(sink: ByteArray, offset: Int, byteCount: Int): Int
actual abstract fun read(sink: ByteArray): Int
actual abstract fun read(sink: ByteArray, offset: Int, byteCount: Int): Int