I am using the Jtidy parser in java.Here 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 takes too much time to analyze the page, so I want to set a time limit for the document object. Please help me how to set the time.
source
share