getBytes

open fun getBytes(size: Int, bytes: Array<Byte>): Int

Read up to size bytes into bytes and return the number of bytes actually read.