Package java.util

Examples of java.util.Properties.keySet()


        } catch (IOException e) {
            throw new RuntimeException("Error when loading properties file=" + propertiesFile, e);
        }

        Pattern pattern = Pattern.compile("systemProp\\.(.*)");
        for (Object argument : properties.keySet()) {
            Matcher matcher = pattern.matcher(argument.toString());
            if (matcher.find()) {
                String key = matcher.group(1);
                if (key.length() > 0) {
                    propertyMap.put(key, properties.get(argument).toString());
View Full Code Here


          props.setProperty(key, value);
        }
      }

      final ModifiableConfiguration config = new HierarchicalConfiguration(defaults);
      final Iterator keys = props.keySet().iterator();
      while (keys.hasNext())
      {
        final String key = (String) keys.next();
        config.setConfigProperty(key, props.getProperty(key));
      }
View Full Code Here

            try {
                FileInputStream fis = new FileInputStream(filename);
                properties.load(fis);
                fis.close();
               
                for (Object o : properties.keySet()) {
                    String key = (String) o;
                    DcField field = getField(key);
                   
                    if (field != null) {
                        String value = properties.getProperty(key);
View Full Code Here

                propertyConsumer.setProperties(prefix, props);
                if (actionListener != null) {
                    actionListener.actionPerformed(e);
                }
            } else {
                Collection keys = props.keySet();
                Iterator it = keys.iterator();
                while (it.hasNext()) {
                    String next = (String) it.next();
                    System.out.println(next + "=" + props.get(next));
                }
View Full Code Here

        // for debugging purposes, allows users to dump out the properties that
        // have been configured
        if (log.isDebugEnabled()) {
            log.debug("Initializing Velocity with the following properties ...");

            for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) {
                String key = (String) iter.next();
                String value = properties.getProperty(key);

                if (log.isDebugEnabled()) {
                    log.debug("    '" + key + "' = '" + value + "'");
View Full Code Here

                messages.putAll(pair.customProperties);
            }
        }
       
        Map<String, String> result = new HashMap<String, String>();
        for(Object key : messages.keySet()) {
            result.put(key.toString(), messages.getProperty(key.toString()));
        }
       
        return Collections.unmodifiableMap(result);
    }
View Full Code Here

      {
        in.close();
      }

      final ModifiableConfiguration config = new HierarchicalConfiguration(defaults);
      final Iterator keys = properties.keySet().iterator();
      while (keys.hasNext())
      {
        final String key = (String) keys.next();
        config.setConfigProperty(key, properties.getProperty(key));
      }
View Full Code Here

                    logger.error("Could not load sustom resource files. Falling back to the default resources.", e);
                    DcSwingUtilities.displayErrorMessage("Unable to load custom resources! " + e.toString());
                }
            }
           
            for (Object o : p.keySet()) {
                String key = (String) o;
                english.put(key, p.getProperty(key));
            }
        }
       
View Full Code Here

        {
            Properties config = new Properties(  );
            config.load( in );

            boolean  debug = _log.isDebugEnabled(  );
            Iterator it = config.keySet(  ).iterator(  );

            while ( it.hasNext(  ) )
            {
                Object key = it.next(  );
                Object uri = config.get( key );
View Full Code Here

        } catch(final IOException e) {
        } finally {
            if (fileIn != null) try { fileIn.close(); fileIn = null; } catch (final Exception e) {}
        }

        final Iterator<Object> it = profile.keySet().iterator();
        while (it.hasNext()) {
            key = (String) it.next();
            value=profile.getProperty(key, "").replaceAll("\r","").replaceAll("\n","\\\\n");
            if( !(key.equals("")) && !(value.equals("")) ){
                prop.put("list_"+count+"_key", key);
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.