JDK-6766844 : ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
When InputStream#read is invoked with a byte of length 0 then 0 is returned without attempting to read any bytes. ByteArrayInputStream breaks this contract for the case that all bytes have been read. In that case it returns -1 instead of 0.