[
https://issues.apache.org/jira/browse/IO-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Niall Pemberton resolved IO-208.
--------------------------------
Assignee: Niall Pemberton
Fix Version/s: 2.0
Resolution: Fixed
Thanks for the patch - I modified it slightly, refactoring the code to delegate
to a new method copyInputStreamToFile()
http://svn.apache.org/viewvc?view=revision&revision=995076
http://svn.apache.org/viewvc?view=revision&revision=995078
> Add timeout (connection and read) support for FileUtils.copyURLToFile
> ---------------------------------------------------------------------
>
> Key: IO-208
> URL: https://issues.apache.org/jira/browse/IO-208
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Reporter: Oliver Siegmar
> Assignee: Niall Pemberton
> Fix For: 2.0
>
> Attachments: copyURLToFile_with_timeouts.diff
>
>
> The copyURLToFile(URL source, File destination) method in FileUtils uses
> source.openStream() to obtain an input stream for the URL. Unfortunately the
> openStream() method does not set any connection or read timeouts and might
> cause applications to hang if they're downloading files using this method. My
> patch adds another method (a second method to keep backwards compatibility)
> copyURLToFile(URL source, File destination, int connectionTimeout, int
> readTimeout) to let define those timeouts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.