private static void loadProxyProperties() throws ProxyConfigurationNotFound { if ( proxyProperties == null ) proxyProperties = PropertyLoader.load (PROXY_PROPERTIES_FILE); if (proxyProperties == null) { throw new ProxyConfigurationNotFound( "Unable to load the file: " + PROXY_PROPERTIES_FILE ); } }
private static void loadProxyProperties() throws ProxyConfigurationNotFound { if ( proxyProperties == null ) proxyProperties = PropertyLoader.load (PROXY_PROPERTIES_FILE); if (proxyProperties == null) { throw new ProxyConfigurationNotFound( "Unable to load the file: " + PROXY_PROPERTIES_FILE ); } }
/** * get the content of the property file int a String * * @param propName the name of the property file * @param lineSeparator line separator between two properties * @return the content of the property file */ public static String getContent (String propName, String lineSeparator) { Properties properties = load (propName); if (null == properties) return null; StringBuffer sb = new StringBuffer (); // display properties content Enumeration e = properties.propertyNames(); for (; e.hasMoreElements() ;) { String key = (String) e.nextElement(); sb.append (key + "=" + properties.getProperty(key) + lineSeparator); } return sb.toString (); } }
/** * get the content of the property file int a String * * @param propName the name of the property file * @param lineSeparator line separator between two properties * @return the content of the property file */ public static String getContent (String propName, String lineSeparator) { Properties properties = load (propName); if (null == properties) return null; StringBuffer sb = new StringBuffer (); // display properties content Enumeration e = properties.propertyNames(); for (; e.hasMoreElements() ;) { String key = (String) e.nextElement(); sb.append (key + "=" + properties.getProperty(key) + lineSeparator); } return sb.toString (); } }