afplib
afplib copied to clipboard
AFPInputStream does not throw away leading bytes
If I understand the surrounding code and comment correctly, leading bytes should not be read to the buffer but skipped instead.
However, the following segment in AFPInputStream reads those bytes to the buffer:
if(leadingLengthBytes > 0) read(data, 0, leadingLengthBytes); // just throw away those
If my assumption is correct and the code is changed to skip() instead of read(), the number of bytes skipped should also be considered (similar to https://github.com/yan74/afplib/issues/63)