read

abstract fun read(offset: Long, into: ByteArray, intoOffset: Int = 0, length: Int = into.size): Int

Read up to length bytes starting at absolute offset into into at intoOffset. Returns the number of bytes read, or -1 at end of source.