62,614
社区成员
发帖
与我相关
我的任务
分享
// 构造URL
URL url = new URL(urlString);
// 打开连接
URLConnection con = url.openConnection();
//设置请求超时为10s
con.setConnectTimeout(10*1000);
// 输入流
InputStream is = con.getInputStream();