Are you using FTP to download the file?
I'm not sure how the BufferedInputStream is involved.  
If the file is downloaded, the BufferedInputStream will never time out.
If the BufferedInputStream has the timeout mechanism, I don't think you need to 
check if the File is download.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Monday, May 13, 2013 at 7:38 PM, Chinababu Illa wrote:

> Hi All,
>  
> I have a requirement to read a pdf as binary stream from remote application
> within specified time.  
> My application code is using BufferedInputStream to read from remote
> application, code is implemented in Java.  
>  
> While reading the data, I need to apply 2 different timeouts:
> 1) a timeout for individual bufferedInputStream.read() (if this waits
> longer, it will be timedout)
> 2) a timeout for entire file to be download (say 2 min, if the file is not
> completely downloaded within 2 min, then timeout)
>  
> I have a solution using timeout calculation manually, but it is not elegant
> solution.
> So wanted to know if this can be done using camel. I looked into stream
> component but didn't quite understood.
>  
> Please let me know if above 2 requirements can be implemented using camel.
>  
> Note: None of the two applications are using Files here. My remote
> application gets the stream data from different application.
>  
> Thanks,
> Chinna
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Streaming-a-PDF-from-remote-machine-tp5732401.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to