How can I set a timeout against a BufferedReader based upon a URLConnection in Java?

前端 未结 5 1196
面向向阳花
面向向阳花 2020-12-19 02:25

I want to read the contents of a URL but don\'t want to \"hang\" if the URL is unresponsive. I\'ve created a BufferedReader using the URL...



        
5条回答
提交回复
热议问题