Code example for PlainSocketFactory

0
      HttpConnectionParams.setConnectionTimeout(httpParams, HeurigenApp.getConfig().socketTimeout());
      HttpConnectionParams.setSoTimeout(httpParams, HeurigenApp.getConfig().socketTimeout());
      HttpConnectionParams.setSocketBufferSize(httpParams, HeurigenApp.getConfig().socketBufferSize());
 
      final SchemeRegistry registry = new SchemeRegistry();
      registry.register(new Scheme("http", new PlainSocketFactory(), RestClient.HTTP_PORT));
 
      httpClient = new DefaultHttpClient(new ThreadSafeClientConnManager(httpParams, registry), httpParams);
      localContext = new BasicHttpContext();
   } 
 
   /** 
    * Converts a Inputstream to String 
    *  
    * @author naikon 
    * @param is the inputstream which is to convert 
    * @throws IOException if an input or output exception occurred 
    * @return the converted string 
    */ 
   public String convertStreamToString(final InputStream is) throws IOException {
      if (is != null) {