FileChannel.transferTo for large file in windows

前端 未结 3 1514
南方客
南方客 2021-01-31 23:20

Using Java NIO use can copy file faster. I found two kind of method mainly over internet to do this job.

public static void copyFile(File sourceFile, File destina         


        
3条回答
  •  伪装坚强ぢ
    2021-01-31 23:41

    There appears to be anecdotal evidence that attempts to transfer more than 64MB at a time on certain Windows versions results in a slow copy. Hence the check: this appears to be the result of some detail of the underlying native code that implements the transferTo operation on Windows.

提交回复
热议问题