common/src/main/java/HTTPClient/HttpURLConnection.java
/**
     * Connects to the server (if connection not still kept alive) and
     * issues the request.
     */
Connects to the server (if connection not still kept alive) and
issues the request.
Connects to the server ( if connection not still kept alive ) and issues the request .
public synchronized void connect()  throws IOException
    {
	if (connected)  return;
	Log.write(Log.URLC, "URLC:  (" + urlString + ") Connecting ...");
	synchronized (con)
	{
	    con.setAllowUserInteraction(allowUserInteraction);
	    if (do_redir)
		con.addModule(redir_mod, 2);
	    else
		con.removeModule(redir_mod);
	    try
	    {
		if (output_stream instanceof ByteArrayOutputStream)
		    resp = con.ExtensionMethod(method, resource,
			((ByteArrayOutputStream) output_stream).toByteArray(),
					     headers);
		else
		    resp = con.ExtensionMethod(method, resource,
				    (HttpOutputStream) output_stream, headers);
	    }
	    catch (ModuleException e)
		{ throw new IOException(e.toString()); }
	}
	connected = true;
    }
public synchronized void connect ( ) throws IOException { if ( connected ) return ; Log . write ( Log . URLC , "URLC:  (" + urlString + ") Connecting ..." ) ; synchronized ( con ) { con . setAllowUserInteraction ( allowUserInteraction ) ; if ( do_redir ) con . addModule ( redir_mod , 2 ) ; else con . removeModule ( redir_mod ) ; try { if ( output_stream instanceof ByteArrayOutputStream ) resp = con . ExtensionMethod ( method , resource , ( ( ByteArrayOutputStream ) output_stream ) . toByteArray ( ) , headers ) ; else resp = con . ExtensionMethod ( method , resource , ( HttpOutputStream ) output_stream , headers ) ; } catch ( ModuleException e ) { throw new IOException ( e . toString ( ) ) ; } } connected = true ; }
Connects to the server (if connection not still kept alive) and
 issues the request.
Connects to the server ( if connection not still kept alive ) and issues the request .
// useCaches TBD!!!