List of usage examples for java.net URLConnection getConnectTimeout
public int getConnectTimeout()
From source file:Main.java
public static void main(String args[]) throws Exception { URL u = new URL("http://www.java2s.com"); URLConnection uc = u.openConnection(); System.out.println(uc.getConnectTimeout()); }
From source file:Main.java
public static void main(String args[]) throws Exception { URL u = new URL("http://www.java2s.com"); URLConnection uc = u.openConnection(); uc.setConnectTimeout(1000);/* w w w . j a v a 2s.c om*/ System.out.println(uc.getConnectTimeout()); }