Package java.util

Examples of java.util.Properties.propertyNames()


        LogManager lm = LogManager.getLogManager();
        try {
            fis = new FileInputStream(globalCfgFile);
            Properties defaultProps = new Properties();
            defaultProps.load(fis);
            Enumeration names = defaultProps.propertyNames();
            int i = 0;
            String name;
            String liveVal;
            while (names.hasMoreElements()) {
                i++;
View Full Code Here


   * Populates the sysProps Map<String,String> with all entries
   * from the system properties object.
   */
  void populateSysProps() {
    final Properties systemProperties = System.getProperties();
    final Enumeration systemPropertiesNames = systemProperties.propertyNames();
    while (systemPropertiesNames.hasMoreElements()) {
      try {
        final String name  = (String) systemPropertiesNames.nextElement();
        final String value = systemProperties.getProperty(name);
        sysProps.put(name, value);
View Full Code Here

              ErrorReporter.getErrorHandler().reportError("Cannot find the properties file");
                throw new ConfigurationManagerException("Cannot find the properties file");
            }
            Properties myProperties = new Properties();
            myProperties.load(inputStream);
            Enumeration propertyNames = myProperties.propertyNames();
            while (propertyNames.hasMoreElements()) {
                String name = (String) propertyNames.nextElement();
                String value = myProperties.getProperty(name);
                config.setProperty(name, value);
            }
View Full Code Here

        }

        value = properties.getProperty(PROP_CONNECTIONPROPERTIES);
        if (value != null) {
          Properties p = getProperties(value);
          Enumeration e = p.propertyNames();
          while (e.hasMoreElements()) {
            String propertyName = (String) e.nextElement();
            dataSource.addConnectionProperty(propertyName, p.getProperty(propertyName));
          }
        }
View Full Code Here

            inputStream.close();
        }

        final Map responseHeaders = new HashMap(headers.size(), 1);

        Enumeration headerNames = headers.propertyNames();
        while (headerNames.hasMoreElements()) {
            String headerName = (String) headerNames.nextElement();
            String headerValue = headers.getProperty(headerName);
            responseHeaders.put(headerName, new Expression(headerValue));
        }
View Full Code Here

            this.config.put("webmail.log.facility",
                    "net.wastl.webmail.logger.ServletLogger");
        }

        // Override settings with webmail.* meta.properties
        final Enumeration rte = rtProps.propertyNames();
        int overrides = 0;
        String k;
        while (rte.hasMoreElements()) {
            k = (String) rte.nextElement();
            if (!k.startsWith("webmail.")) {
View Full Code Here

             * Always cache using context class loader..
             */
            cacheFactory(contextClassLoader, factory);

            if( props!=null ) {
                Enumeration names = props.propertyNames();
                while (names.hasMoreElements()) {
                    String name = (String) names.nextElement();
                    String value = props.getProperty(name);
                    factory.setAttribute(name, value);
                }
View Full Code Here

  private Set getAllSystemPropKeys()
  {
    final HashSet res = new HashSet();

    final Properties properties = System.getProperties();
    for (Enumeration pke = properties.propertyNames(); pke.hasMoreElements();){
      final String key = (String) pke.nextElement();
      res.add(key);
    }
    return res;
  }
View Full Code Here

            throw new SemanticsReaderException( "module.uri must be specified" );
        }

        SimpleSemanticModule module = new SimpleSemanticModule( uri.trim( ) );

        for ( Enumeration propNames = props.propertyNames( ); propNames.hasMoreElements( ); )
        {
            String key = (String) propNames.nextElement( );

            if ( key.equals( "module.uri" ) )
            {
View Full Code Here

        m_url_map = Main.class.getResource("map.png");

        if (m_settings.isDebug())
        {
            Properties props = System.getProperties();
            Enumeration enumProp = props.propertyNames();
            while (enumProp.hasMoreElements())
            {
                String key = (String)enumProp.nextElement();
                String val = System.getProperty(key);
                System.err.println(key + ": " + val);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.