c1823701cc76790494fb622fe58f0942236cd7d0
Before, the variants of MemoryFile.MemoryInputStream.read() would throw IOException or IndexOutOfBoundsException if EOF was encountered before the requested number of bytes was read. This violates the contract of InputStream.read(). This patch makes read() return the number of bytes available, if any. If already at EOF, -1 is returned. The patch also adds new tests, which checks cases where MemoryFile.MemoryInputStream.read() should throw IndexOutOfBoundsException or return -1. several of these tests failed with the old code and pass now. This fixes http://b/issue?id=1881894
Description
No description provided
Languages
Java
73.7%
Kotlin
14%
PowerBuilder
5.8%
C++
5.2%
AIDL
1%