Answered
Bug in byteArray 's method readBytes
Hi
When I use readBytes ie. like this:
data.readBytes(chunkData, 16, 4);
I get 20 bytes not the 4 I requested (chunkData.length = 20 not 4).
Hi
When I use readBytes ie. like this:
data.readBytes(chunkData, 16, 4);
I get 20 bytes not the 4 I requested (chunkData.length = 20 not 4).
The second argument is the offset of the destination ByteArray.
You are reading 4 bytes from the source (data) and inserting those 4 bytes at offset 16 of chunkData - therefore chunkData.length is 20;
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.