I am using Jtidy parser in java.Here is my code...
URL url = new URL("www.yahoo.com");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
InputStream in = conn.getInputStream();
Tidy tidy = new Tidy();
Document doc = tidy.parseDOM(in, null);
when I come to this statement Document doc = tidy.parseDOM(in, null);
,it is taking too much time to parse the page, so I want to set the time limit to document object. Please help me, how to set time.