Package java.util

Examples of java.util.Properties.stringPropertyNames()


            try {
                fis = new FileInputStream(file);
                Properties tempProps = new Properties();
                tempProps.load(fis);

                return tempProps.stringPropertyNames();
            } finally {
                safeClose(fis);
            }

        }
View Full Code Here


    return conf;
  }

  public void copyTxProperties(org.apache.hadoop.conf.Configuration destination) {
    Properties props = getProps();
    for (String property : props.stringPropertyNames()) {
      if (property.startsWith("data.tx") || property.startsWith("tx.persist")) {
        destination.set(property, get(property));
      }
    }
  }
View Full Code Here

                jvm_flag(args, "-javaagent:" + configuration.getJavaAgent());
            }

            // add any system properties starting with appengine.test.
            Properties properties = System.getProperties();
            for (String key : properties.stringPropertyNames()) {
                if (key.startsWith(APPENGINE_TEST)) {
                    jvm_flag(args, "-D" + key.substring(APPENGINE_TEST.length()) + "=" + properties.getProperty(key));
                }
            }
View Full Code Here

            Properties properties = new Properties();
            properties.load(stream);
            stream.close();

            List<FileEntry> result = new ArrayList<FileEntry>();
            for (String file : properties.stringPropertyNames()) {
                result.add(new FileEntry(properties.getProperty(file), path + file));
            }
            Collections.sort(result);

            return result;
View Full Code Here

            parameters.put(SessionParameter.COMPRESSION, "true");
        }

        // get additional workbench properties from system properties
        Properties sysProps = System.getProperties();
        for (String key : sysProps.stringPropertyNames()) {
            if (key.startsWith(WORKBENCH_PREFIX)) {
                parameters.put(key, sysProps.getProperty(key));
            }
        }
View Full Code Here

  public Map<String, String> getAmbariProperties() {
   
    Properties properties = readConfigFile();
    Map<String, String> ambariPropertiesMap = new HashMap<String, String>();
   
    for(String key : properties.stringPropertyNames()) {
      ambariPropertiesMap.put(key, properties.getProperty(key));
    }
    return ambariPropertiesMap;
  }
View Full Code Here

            File file = new File(frameworkProperties);
            try {
                FileInputStream input = new FileInputStream(file);
                Properties props = new Properties();
                props.load(input);
                for (String key : props.stringPropertyNames()) {
                    frameworkConfiguration.put(key, props.getProperty(key));
                }
            } catch (IOException ex) {
                throw new ConfigurationException("Cannot read: " + file.getAbsolutePath());
            }
View Full Code Here

        try {
            fis = new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8"));
            Properties tempProps = new Properties();
            tempProps.load(fis);

            return tempProps.stringPropertyNames();
        } finally {
            safeClose(fis);
        }

    }
View Full Code Here

        log.infof("JBoss AS %s \"%s\" starting", Version.AS_VERSION, Version.AS_RELEASE_CODENAME);
        if (configLog.isDebugEnabled()) {
            final Properties properties = System.getProperties();
            final StringBuilder b = new StringBuilder(8192);
            b.append("Configured system properties:");
            for (String property : new TreeSet<String>(properties.stringPropertyNames())) {
                b.append("\n\t").append(property).append(" = ").append(properties.getProperty(property, "<undefined>"));
            }
            configLog.debug(b);
            if (configLog.isTraceEnabled()) {
                b.setLength(0);
View Full Code Here

    // Queue-properties
    Properties props = jqi.getProperties();
    Element propsElement = document.createElement(PROPERTIES_TAG);
    if (props != null) {
      Set<String> propList = props.stringPropertyNames();
      for (String prop : propList) {
        Element propertyElement = document.createElement(PROPERTY_TAG);
        propertyElement.setAttribute(KEY_TAG, prop);
        propertyElement.setAttribute(VALUE_TAG, (String) props.get(prop));
        propsElement.appendChild(propertyElement);
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.