我想通过URLConnection下载网页源码? 因为开很多个线程下载,所以会出现超时的情况。请问要如何处理才能保证一定下载成功呢?
人生最曼妙的风景,竟是内心的淡定与从容!
Manually access a website that does not exist and let it throw a timeout exception, and then catch the exception and judge it. If it is a timeout exception when running again, re-initiate the request.
Manually access a website that does not exist and let it throw a timeout exception, and then catch the exception and judge it. If it is a timeout exception when running again, re-initiate the request.