0

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();
Jessy Jameson
  • 157
  • 1
  • 5
  • 15

1 Answers1

0
HttpURLConnection ex1 = (HttpURLConnection) u.openConnection();
ex1.setChunkedStreamingMode(7000); // enable chunked streaming mode before connecting  to server.
harry
  • 731
  • 10
  • 23