Package java.util

Examples of java.util.Properties.keys()


   }

   public void logProperties()
   {
      Properties props = System.getProperties();
      for (Enumeration e = props.keys(); e.hasMoreElements();)
      {
         String key = (String) e.nextElement();
         if (key.startsWith("test.messagedriven."))
            log.info(key + "=" + props.getProperty(key));
      }
View Full Code Here


   
    Properties p = new Properties();
    try {
      p.load(this.getClass().getResourceAsStream("_resources/langmappings.properties"));

      Enumeration<Object> alllanguages = p.keys();
      StringBuilder list = new StringBuilder("Language identifier plugin supports:");
      Map<NGramEntry, List<NGramEntry>> tmpIdx = new HashMap<NGramEntry, List<NGramEntry>>();
      while (alllanguages.hasMoreElements()) {
        String lang = (String) (alllanguages.nextElement());
View Full Code Here

      try
      {
         mimeTypes.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("org/jboss/web/mime.types"));

         Enumeration keys = mimeTypes.keys();
         while (keys.hasMoreElements())
         {
            String extension = (String) keys.nextElement();
            String type = mimeTypes.getProperty(extension);
            server.addMimeType(extension, type);
View Full Code Here

                                .getResourceAsStream(
                                        "entagged/listing/xml/resource/xsltargets.properties"));

                HashMap type2lang = new HashMap();
                // Now process the transform target definitions
                Enumeration enumeration = properties.keys();
                while (enumeration.hasMoreElements()) {
                    String currentKey = (String) enumeration.nextElement();
                    String value = properties.getProperty(currentKey);
                    String[] keyStruct = currentKey.split("\\.");
                    String type = keyStruct[0];
View Full Code Here

        }
       
        Properties systemProperties = System.getProperties();
        String key;
        log.info("System properties:");
        for(Enumeration e = systemProperties.keys(); e.hasMoreElements();) {
            key = (String)e.nextElement();
            log.info("   " + key + ": " + systemProperties.getProperty(key));
        }
        // #endif
View Full Code Here

        try {
            File f = new File(getConfDirectory(), "system.properties");
            in = new FileInputStream(f);
            Properties p = new Properties();
            p.load(in);
            for (Enumeration e = p.keys(); e.hasMoreElements();) {
                String k = (String) e.nextElement();
               
                // The test may have already specified devExtensions
                if(!k.equals("adito.devExtensions") || SystemProperties.get("adito.devExtensions") == null) {
                    System.getProperties().setProperty(k, p.getProperty(k).trim());                 
View Full Code Here

        try {
            File f = new File(CONF_DIR, "system.properties");
            in = new FileInputStream(f);
            Properties p = new Properties();
            p.load(in);
            for (Enumeration e = p.keys(); e.hasMoreElements();) {
                String k = (String) e.nextElement();
                System.getProperties().setProperty(k, p.getProperty(k).trim());
            }
        } catch (IOException e) {
            // Dont care
View Full Code Here

    // now we have to crate one attribute per property found
    Configuration configuration =
      ConfigurationManager.getConfiguration(configurationName);
    Category category = configuration.getCategory(categoryName);
    Properties properties = category.getProperties();
    Enumeration propertiesEnum = properties.keys();

    while (propertiesEnum.hasMoreElements()) {

      String propertyName = (String) propertiesEnum.nextElement();
View Full Code Here

            Configuration cfg = ConfigurationManager.getConfiguration(baseConfigName);
            Properties parentProps = cfg.getProperties(category);
            println("!!!!!");
            if ( debug ) parentProps.list(System.err);
            println("!!!!!");
            Enumeration num = parentProps.keys();
            while ( num.hasMoreElements() ) {
                String name = (String)num.nextElement();
                println("lookin for " + name);
                if ( !props.containsKey(name) ) {
                  println("adding " + name);
View Full Code Here

   */
  void printJVMInfo(Framework framework) {
    try {
      Properties props = System.getProperties();
      System.out.println("--- System properties ---");
      for(Enumeration e = props.keys(); e.hasMoreElements(); ) {
        String key = (String)e.nextElement();
        System.out.println(key + ": " + props.get(key));
      }

      System.out.println("\n");
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.