Package java.util

Examples of java.util.Properties.list()


        try {
            props.load(new FileInputStream(new File(iniFileName)));              
        }
        catch (Exception e) {
            System.out.println("Didn't find props file, using defaults");
            props.list(System.out);
        }
        return props;
    }
   
    protected Document createXMLFile(String fileName) throws Exception {
View Full Code Here


        }
        if(log.isDebugEnabled()) {
            Properties sysprops = System.getProperties();
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            sysprops.list(pw);
            pw.flush();
            log.debug(sw.getBuffer().toString());
        }
        MessagingServer server = new MessagingServer(config);
        if (verbose)
View Full Code Here

    protected void assertGoodFile() throws Exception {
        File f = createRelativeFile(GOOD_OUTFILE);
        assertTrue("Did not create "+f.getAbsolutePath(),
            f.exists());
        Properties props=loadPropFile(GOOD_OUTFILE);
        props.list(System.out);
        assertEquals("test property not found ",
                     TEST_VALUE, props.getProperty("test.property"));
    }

View Full Code Here

      HAJNDITestHarness test = new HAJNDITestHarness();
      try
      {
         System.out.println("HAJNDITestHarness properties");
         Properties props = test.getPropAsResource(SIMPLE_CONFIG_SERVER_PROP);
         props.list(System.out);
         System.out.println("getting initial context");
         InitialContext ctx = new InitialContext(props);

         try
         {
View Full Code Here

      JNDITestHarness test = new JNDITestHarness();
      try
      {
         System.out.println("JNDITestHarness properties");
         Properties props = test.getPropAsResource(TestClient.SIMPLE_CONFIG_SERVER_PROP);
         props.list(System.out);
      }
      catch (Exception e)
      {
         System.out.println(e);
      }
View Full Code Here

          settings.setProperty(k, v);         
          System.setProperty(k, v);
        }
       
        try{
          settings.list(System.out);
          /*PrintStream out = new PrintStream(new FileOutputStream(GlobalContext.SETTING_FILE));
          settings.list(out);*/
         
          settings.store(new FileOutputStream(GlobalContext.SETTING_FILE), null);
        }catch(Exception e){
View Full Code Here

            super.list(printStream);
        } else {
      MapAccessor ma = (MapAccessor) speedoGetHome().readIntention(this, null);
            Properties p = new Properties();
            p.putAll(ma);
            p.list(printStream);
        }
    }

    public void list(PrintWriter printWriter) {
    Properties p = new Properties();
View Full Code Here

      p.putAll(accessor);
        } else {
      MapAccessor ma = (MapAccessor) speedoGetHome().readIntention(this, null);
            p.putAll(ma);
        }
    p.list(printWriter);
    }

    public int size() {
        if (!speedoIsActive()) {
            return accessor.size();
View Full Code Here

  private static void listProperties(String portString) throws Exception{
    int port = Integer.parseInt(portString);
    NetworkServerControl derbyServer = new NetworkServerControl( InetAddress.getByName("localhost"),
                          port);
    Properties p = derbyServer.getCurrentProperties();
    p.list(System.out);
  }

  public static void main (String args[]) throws Exception
  {
    if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9"))
View Full Code Here

        Properties myProps = new Properties();
        myProps.setProperty("Abba", "Cadabra");
        myProps.setProperty("Open", "Sesame");
        myProps.setProperty("LongProperty",
                "a long long long long long long long property");
        myProps.list(ps);
        ps.flush();
        String propList = baos.toString();
        assertTrue("Property list innacurate",
                propList.indexOf("Abba=Cadabra") >= 0);
        assertTrue("Property list innacurate",
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.