Code example for SchemeRegistry

Methods: register

		if (this.mPort != port) {
			// Proxy port has changed so set up appropriate HttpClient 
			this.mPort = port;
			SchemeRegistry supportedSchemes = new SchemeRegistry();
			supportedSchemes.register(new Scheme("http", new SocksSocketFactory("", port), 80));
			// SSL support is broken at the moment 
	        supportedSchemes.register(new Scheme("https", 
	                SSLSocketFactory.getSocketFactory("", port), 443));
	        // prepare parameters 
	        HttpParams params = new BasicHttpParams();
	        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
	        HttpProtocolParams.setContentCharset(params, "UTF-8");
	        HttpProtocolParams.setUseExpectContinue(params, true);
	        ClientConnectionManager ccm = new MyThreadSafeClientConnManager(params, 
	        mClient = new DefaultHttpClient(ccm, params);
Connect your IDE to all the code out there  Get Codota for Java