OSDN Git Service

Fixing bulk reads in ByteArray.MyInputStream
authorJesse Wilson <jessewilson@google.com>
Mon, 3 May 2010 22:27:11 +0000 (15:27 -0700)
committerJesse Wilson <jessewilson@google.com>
Mon, 3 May 2010 22:46:05 +0000 (15:46 -0700)
commit508a92917e983723cd94915592d837a114b69110
treeb99bb795800e00d31f40509f94c3f95ee3597ab9
parent02a7882ba97645ca3e2d4490a28a77c1226664a8
Fixing bulk reads in ByteArray.MyInputStream

This has never worked properly, but it didn't matter until recently
because neither the JDK's nor early Dalvik's DataInputStream was
exercising it. But in 2.0, Dalvik's DataInputStream prefers bulk
reads, which exercises this code when run on-device.

http://code.google.com/p/android/issues/detail?id=8115

The problem was that System.arraycopy call didn't include the start
offset in the call.
dx/src/com/android/dx/util/ByteArray.java