If you call InputStreamReader.read(char[], int, int) with negative values in the offset and length parameters, no exception is raised. The read is performed. In my test, which used a 3 character array, the call was:
isr.read(array, -5, -10) and the resulting array was unchanged.
isr.read(array, -5, -10) and the resulting array was unchanged.
- duplicates
-
JDK-4127657 read(byte[], int, int) in xxxReader can throw undocumented exceptions
-
- Closed
-