Package java.util

Examples of java.util.Properties.load()


      Properties props = System.getProperties();
      InputStream is = SocketServerConnectionFactory.class.getResourceAsStream("/teiid-client-settings.properties"); //$NON-NLS-1$
      if (is != null) {
        props = new Properties(props);
        try {
          props.load(is);
        } catch (IOException e) {
         
        } finally {
          try {
            is.close();
View Full Code Here


  public URL getDispatchUrl(FormAuthorityRef ref) {
    StringBuffer sb = new StringBuffer();
    Properties properties = new Properties();
    try {
      properties.load(AbstractFormDispatcher.class.getResourceAsStream("/jbpm.console.properties"));
    } catch (IOException e) {
      throw new RuntimeException("Could not load jbpm.console.properties", e);
    }
    sb.append("http://");
    sb.append(properties.get("jbpm.console.server.host"));
View Full Code Here

      return result;
    }
    StringBuffer sb = new StringBuffer();
    Properties properties = new Properties();
    try {
      properties.load(AbstractFormDispatcher.class.getResourceAsStream("/jbpm.console.properties"));
    } catch (IOException e) {
      throw new RuntimeException("Could not load jbpm.console.properties", e);
    }
    try {
      sb.append("http://");
View Full Code Here

    if (client == null) {
      String ipAddress;
      int port;
      Properties properties = new Properties();
      try {
        properties.load(AbstractFormDispatcher.class.getResourceAsStream("/jbpm.console.properties"));
        ipAddress = properties.getProperty("jbpm.console.task.service.host");
        port = new Integer(properties.getProperty("jbpm.console.task.service.port"));
      } catch (IOException e) {
        throw new RuntimeException("Could not load jbpm.console.properties", e);
      }
View Full Code Here

      return os.toByteArray();
    }
    StringBuffer sb = new StringBuffer();
    Properties properties = new Properties();
    try {
      properties.load(GraphViewerPluginImpl.class.getResourceAsStream("/jbpm.console.properties"));
    } catch (IOException e) {
      throw new RuntimeException("Could not load jbpm.console.properties", e);
    }
    try {
      sb.append("http://");
View Full Code Here

      return result;
    }
    StringBuffer sb = new StringBuffer();
    Properties properties = new Properties();
    try {
      properties.load(GraphViewerPluginImpl.class.getResourceAsStream("/jbpm.console.properties"));
    } catch (IOException e) {
      throw new RuntimeException("Could not load jbpm.console.properties", e);
    }
    try {
      sb.append("http://");
View Full Code Here

            Properties props = new Properties();
            stream = TransportDirectory.class.getResourceAsStream(path);
            if (stream == null) {
                throw new RuntimeException("Unable to load required properties file '" + path + '\'');
            }
            props.load(stream);

            for (Iterator iter = props.keySet().iterator(); iter.hasNext();) {
                String protocol = (String) iter.next();
                String classname = props.getProperty(protocol);
                try {
View Full Code Here

  }

  private void loadProperties() {
    Properties properties = new Properties();
    try {
      properties.load(LogFactory.class.getClassLoader()
          .getResourceAsStream("firefly-log.properties"));
    } catch (IOException e) {
      e.printStackTrace();
    }
    for (Entry<Object, Object> entry : properties.entrySet()) {
View Full Code Here

                exit = true;
            }
        }
        Properties prop = new Properties();
        InputStream in = getClass().getResourceAsStream("test.properties");
        prop.load(in);
        in.close();
        int size = Integer.parseInt(prop.getProperty("size"));
        ArrayList<Database> dbs = new ArrayList<Database>();
        for (int i = 0; i < 100; i++) {
            if (dbId != -1 && i != dbId) {
View Full Code Here

    String realPath = context.getRealPath(status_file_uri.toString());
    Properties props = new Properties();
    FileInputStream fis = null;
    try {
      fis = new FileInputStream(realPath);
      props.load(fis);
      String s_last_time = props.getProperty(TIME_KEY);
      return new Date(Long.parseLong(s_last_time));
    } catch (FileNotFoundException e) {
    } catch (NumberFormatException e) {
    } catch (NullPointerException e) {
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.