if (httpConn == null) {
// connect and initialize streams
// timeout is stored in seconds in HttpTool, but
// HttpConnection uses milliseconds
if (secureConnection) {
HttpsHelper helper = new HttpsHelper(proxyAddr,proxyPort,useProxy());
httpConn = helper.createHttpsConnection(host,port);
} else {
if (useProxy()) {
httpConn = HttpConnection.createConnection(proxyAddr,
proxyPort,
socketTimeout*1000);