public static SystemProxySettings create(){
  final SystemProxySettings proxySettings=new SystemProxySettings();
  proxySettings.httpUser=System.getProperty("http.proxyUser");
  proxySettings.httpPassword=System.getProperty("http.proxyPassword");
  proxySettings.httpHost=System.getProperty("http.proxyHost");
  proxySettings.httpPort=System.getProperty("http.proxyPort");
  proxySettings.httpNonProxyHosts=System.getProperty("http.nonProxyHosts");
  proxySettings.httpsUser=System.getProperty("https.proxyUser");
  proxySettings.httpsPassword=System.getProperty("https.proxyPassword");
  proxySettings.httpsHost=System.getProperty("https.proxyHost");
  proxySettings.httpsPort=System.getProperty("https.proxyPort");
  return proxySettings;
}

public static SystemProxySettings create ( ) { final SystemProxySettings proxySettings = new SystemProxySettings ( ) ; proxySettings . httpUser = System . getProperty ( "http.proxyUser" ) ; proxySettings . httpPassword = System . getProperty ( "http.proxyPassword" ) ; proxySettings . httpHost = System . getProperty ( "http.proxyHost" ) ; proxySettings . httpPort = System . getProperty ( "http.proxyPort" ) ; proxySettings . httpNonProxyHosts = System . getProperty ( "http.nonProxyHosts" ) ; proxySettings . httpsUser = System . getProperty ( "https.proxyUser" ) ; proxySettings . httpsPassword = System . getProperty ( "https.proxyPassword" ) ; proxySettings . httpsHost = System . getProperty ( "https.proxyHost" ) ; proxySettings . httpsPort = System . getProperty ( "https.proxyPort" ) ; return proxySettings ; }
read proxy settings from the system properties and enclose it into the proxysettings object .
