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>
Wed, 5 May 2010 21:03:05 +0000 (14:03 -0700)
commit4751c150542ec282f6c6d58984974edec6c0a045
treefd11f85d87afa833581a4de469fe73442db9db1d
parentc03da3e87a0537b211f2300d594597d84898b8f7
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