Issue #3840 - Applying ByteBuffer niggle from PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
ed8d9cabff
commit
7a867c0ff0
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue