Package java.util

Examples of java.util.Properties.load()


    }
      Properties props = new Properties();
      FileInputStream fis = null;
      try {
        fis = new FileInputStream("connection.properties"); //$NON-NLS-1$
        props.load(fis);
      } catch (IOException e) {
        log.log(Level.WARNING, "Could not load default connection properties.", e); //$NON-NLS-1$
      } finally {
        if (fis != null) {
          try {
View Full Code Here


      Enumeration<URL> urls = utils.getClass().getClassLoader().getResources(resourceName);
      boolean first = true;
      while (urls.hasMoreElements()) {
  URL url = urls.nextElement();
  if (first) {
    defaultProps.load(url.openStream());
    first = false;
  }
  else {
    Properties props = new Properties(defaultProps);
    props.load(url.openStream());
View Full Code Here

    defaultProps.load(url.openStream());
    first = false;
  }
  else {
    Properties props = new Properties(defaultProps);
    props.load(url.openStream());
    defaultProps = props;
  }
      }
    } catch (Exception ex) {
      System.err.println("Warning, unable to load properties file(s) from "
View Full Code Here

                             + File.separator
                             + resourceName);

    if (propFile.exists()) {
      try {
        userProps.load(new FileInputStream(propFile));
      } catch (Exception ex) {
        throw new Exception("Problem reading user properties: " + propFile);
      }
    }
View Full Code Here

    // Allow a properties file in the current directory to override
    Properties localProps = new Properties(userProps);
    propFile = new File(resourceName);
    if (propFile.exists()) {
      try {
        localProps.load(new FileInputStream(propFile));
      } catch (Exception ex) {
        throw new Exception("Problem reading local properties: " + propFile);
      }
    }
   
View Full Code Here

            + "PackageRepository.props");
       
       
        if (repPropsFile.exists()) {
          Properties repProps = new Properties();
          repProps.load(new FileInputStream(repPropsFile));
          repURL = repProps.getProperty("weka.core.wekaPackageRepositoryURL");
        }
      }
     
      if (repURL == null || repURL.length() == 0) {
View Full Code Here

      Properties expProps = new Properties();
      String explorerProps = getPackageHome().getAbsolutePath()
        + File.separator + installedPackageName + File.separator
        + "Explorer.props";
      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(explorerProps));
      expProps.load(bi);
      bi.close();
      bi = null;
      Set keys = expProps.keySet();
      Iterator keysI = keys.iterator();
      while (keysI.hasNext()) {
View Full Code Here

 
  protected static void processGenericPropertiesCreatorProps(File propsFile) {
    try {
      Properties expProps = new Properties();
      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile));
      expProps.load(bi);
      bi.close();
      bi = null;
      Properties GPCInputProps = GenericPropertiesCreator.getGlobalInputProperties();
     
      Set keys = expProps.keySet();
View Full Code Here

 
  protected static void processExplorerProps(File propsFile) {
    try {
      Properties expProps = new Properties();
      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile));
      expProps.load(bi);
      bi.close();
      bi = null;
      Set keys = expProps.keySet();
      Iterator keysI = keys.iterator();
      while (keysI.hasNext()) {
View Full Code Here

  protected static void processGUIEditorsProps(File propsFile) {
    GenericObjectEditor.registerEditors();
    try {
      Properties editorProps = new Properties();
      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile));
      editorProps.load(bi);
      bi.close();
      bi = null;
     
      Enumeration enm = editorProps.propertyNames();
      while (enm.hasMoreElements()) {
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.