Fix infinite loop in PackedInputStream when the supplied ArrayInputStream is smaller than the requested read length.
This seems to have been caused by ArrayInputStream not adhering to the contract of getReadBuffer() in the BufferedInputStream interface, thus the behaviour is different when calling SerializePacker.readFromUnbuffered() and SerializePacked.read().
Additionally:
ArrayInputStream is no longer final, as there is no reason to stop consumers from extending and adjusting the behaviour
The wrapped ByteBuffer is not private, as according to the (previously) undocumented contract, it should be only accessible through #getReadBuffer().
Fix infinite loop in PackedInputStream when the supplied ArrayInputStream is smaller than the requested read length.
This seems to have been caused by ArrayInputStream not adhering to the contract of
getReadBuffer()
in theBufferedInputStream
interface, thus the behaviour is different when callingSerializePacker.readFromUnbuffered()
andSerializePacked.read()
.Additionally: