How do I read bytes into a Byte Array? In java I used to initialize byte array as byte[] b = new byte[100] and then pass that to the corresponding method. However in Kotlin, I am unable to initialize ByteArray with how many bytes the buffer should have.
In other words, how do I use this function?: https://developer.android.com/reference/kotlin/java/io/RandomAccessFile#read(kotlin.ByteArray)