548540bc2d
This was because it was possible to have the JDK read into a wrong buffer region if the user called discardReadBytes() later. Fixes #1377