Fast file copy and move by java

The following method does very fast file copy from one location to another location.

Here i used 4096 byte buffer thats the key for fast copy.this value is optimize value from from different tested values.

The following method does very fast file move from one location to another location.

The key of fast moving is the rename function.

3 thoughts on “Fast file copy and move by java

  1. Hi,

    you example is pretty interesting for me….In your opinion could this solution improve the file movement in c# too ?
    Cheers anyway.

    Stefano

  2. Thanks Stefano.

    I think so, here the buffer size is the key for fast copying(fast streaming) and rename for movement. rename operation will update the file location information form OS file dictionary without IO operation. so this idea will work for all language.

    Rajib

Leave a Reply

Your email address will not be published. Required fields are marked *