Move force() after multiple writes, not at every steps
This commit is contained in:
parent
65876fa7fb
commit
877383de3a
@ -212,8 +212,8 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData {
|
||||
int written = 0;
|
||||
while (written < length) {
|
||||
written += fileChannel.write(byteBuffer);
|
||||
fileChannel.force(false);
|
||||
}
|
||||
fileChannel.force(false);
|
||||
fileChannel.close();
|
||||
isRenamed = true;
|
||||
return written == length;
|
||||
|
Loading…
Reference in New Issue
Block a user