I need to copy all HTML code on the page.
I do so:
URL url = new URL(testurl);
URLConnection connection = url.openConnection();
connection.connect();
Scanner in = new Scanner(connection.getInputStream());
while(in.hasNextLine())
{
htmlText=htmlText+in.nextLine();
}
in.close();
But if the page is large, it takes a lot of time.
Is there a faster method?