Issue #3840 - Applying ByteBuffer niggle from PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-07-30 19:59:49 -05:00
parent ed8d9cabff
commit 7a867c0ff0
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ public class SeekableByteChannelRangeWriter implements RangeWriter
long readTotal = 0;
while (readTotal < length)
{
BufferUtil.flipToFill(buffer);
BufferUtil.clearToFill(buffer);
int size = (int)Math.min(bufSize, length - readTotal);
buffer.limit(size);
int readLen = channel.read(buffer);

View File

@ -594,7 +594,7 @@ public class PathResource extends Resource
long readTotal = 0;
while (readTotal < length)
{
BufferUtil.flipToFill(buffer);
BufferUtil.clearToFill(buffer);
int size = (int)Math.min(IO.bufferSize, length - readTotal);
buffer.limit(size);
int readLen = channel.read(buffer);