[ 
https://issues.apache.org/jira/browse/IO-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Siegmar updated IO-208:
------------------------------

    Attachment: copyURLToFile_with_timeouts.diff

The patch to add copyURLToFile(URL source, File destination, int 
connectionTimeout, int readTimeout)

> 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
>    Affects Versions: 1.5
>            Reporter: Oliver Siegmar
>         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.

Reply via email to