There are three methods to set and get various options. The defaults are generally fine.
public synchronized void setSoTimeout(int timeout) throws SocketException
public synchronized int getSoTimeout() throws IOException
public static synchronized void setSocketFactory(SocketImplFactory
fac) throws IOException