简体   繁体   English

打开url连接并等待完成url java的加载

[英]open url connection and wait to finish loading of the url java

i have the following code. 我有以下代码。 i want to get the url after finished loading the url. 我想在完成加载网址后获取网址。 How can i do my connection to wait to finish the loading first? 我该如何连接以等待首先完成加载? Thank you in advance 先感谢您

URL u = new URL("http://google.com/search?sourceid=navclient&btnI=1&q=" + jTextField1.getText().toString());
HttpURLConnection con = (HttpURLConnection) u.openConnection();
HttpURLConnection ex1 = (HttpURLConnection) u.openConnection();
ex1.setChunkedStreamingMode(7000); // enable chunked streaming mode before connecting  to server.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM