[ http://issues.apache.org/jira/browse/IO-50?page=all ]
Henri Yandell resolved IO-50:
-----------------------------
Resolution: Won't Fix
Marking this as a won't do.
Even if someone did a fancy reflection version we shouldn't add it as it would
be a maintenance pain.
Sorry James.
> [io] Use java.nio for copyFile(File source, File destination)
> -------------------------------------------------------------
>
> Key: IO-50
> URL: http://issues.apache.org/jira/browse/IO-50
> Project: Commons IO
> Type: Improvement
> Versions: 1.0 Final
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: jamesm
> Priority: Minor
>
> I suggest research into making the following change in FileUtils.java, to
> replace the current block of code which does the copying:
> --- begin ---
> FileInputStream input = new FileInputStream(source);
> try {
> FileOutputStream output = new FileOutputStream(destination);
> try {
> FileChannel inputChannel = fileIn.getChannel();
> FileChannel outputChannel = fileOut.getChannel();
> inputChannel.transferTo(0, source.length(), outputChannel);
> }
> finally {
> IOUtils.closeQuietly(output);
> }
> }
> finally {
> IOUtils.closeQuietly(input);
> }
> --- end ---
> I believe this may be faster as it uses the operating system directly. There
> is
> also the option of providing this method under a different name, e.g.
> copyFileNIO.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]