craigwblake / redline

Pure Java Rpm Library
http://redline-rpm.org
MIT License
128 stars 97 forks source link

Fix #129 - fill buffer completely in read before calling consumers. #130

Open 85danf opened 6 years ago

85danf commented 6 years ago

A fix for #129 :

It would be preferable to simply report the actual amount channel.read() returns which is exactly what the said consumer is interested in, and avoid the duplicate logic between uitil:fill and the read method but I understand the interface restrictions for the Consumer interface.