Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

When I align the time values, it appears that the stream copy is the fasted, not the channel copy. Time taken by Stream Copy = 44582575000 Time taken by Channel Copy = 104138195000 Time taken by Apache Commons IO Copy = 108396714000 Time taken by Java7 Files Copy = 8906157800
- Joel Shprentz
Time taken by Stream Copy … 44,582,575,000 Time taken by Channel Copy … 104,138,195,000 Time taken by Apache Commons IO Copy … 108,396,714,000 Time taken by Java7 Files Copy … 89,061,578,000
- Me
None of these people ran your program. You’re missing the point. These are the numbers, copied and pasted, that you posted in your article above: Time taken by Stream Copy = 44582575000 Time taken by Channel Copy = 104138195000 Time taken by Apache Commons IO Copy = 108396714000 Time taken by Java7 Files Copy = 89061578000 If you list the numbers first, you get this (zeroes inserted at the beginning to align the numbers): 044582575000 = Time taken by Stream Copy 104138195000 = Time taken by Channel Copy 108396714000 = Time taken by Apache Commons IO Copy 089061578000 = Time taken by Java7 Files Copy This shows that your Stream Copy test took much less time than the two Channel Copy tests. How did you conclude that Channel Copy is the fastest? Your very own run of the test contradicts that.
- Brian
Thanks for an interesting look at the different methods. I ran your program on my laptop, and stream copy was by far the fastest Time taken by Stream Copy = 3,337,266,041 (3 billion…) Time taken by Channel Copy = 18,994,299,884 (18 billion…) Time taken by Java7 Files Copy = 15,816,023,905 (15 billion…) Looking at the above figures, Stream copy is 6x faster than Channel copy, and 5x faster than Java7 Files copy. Several runs came up with similar figures.
- Mike Nixon
Hey Pankaj, no one has rerun your tests, but we’re all curious since the numbers you published are the exact opposite of what you say in the text. Did you mess up reading your numbers, or did you make a mistake in writing them down? According to your figures stream copy is over twice as fast as everything else?
- Curious
Hi Pankaj…can you explain : how to copy a large file (~3GB .avi) to another loacation?? Example : from C: to D: Thanks
- đông
Could you please explain me the situations at which an IOException can happen during a file copy.
- Ram Mahesh Kumar
Hi All, How to copy directories and file from one location to another location on same ftp server?
- Venki