Here you can find the source of getDoc(Connection conn)
public static Document getDoc(Connection conn)
//package com.java2s; //License from project: Apache License import java.io.IOException; import org.jsoup.Connection; import org.jsoup.nodes.Document; public class Main { public static Document getDoc(Connection conn) { Document doc = null;/*from w w w . j a v a2 s. c om*/ int retry = 0; IOException e1 = null; while (retry++ < 3) { try { doc = conn.get(); return doc; } catch (IOException e) { e1 = e; System.out.println("retry:" + retry); } } throw new RuntimeException(e1); } }