Package java.util

Examples of java.util.Properties.store()


    VFSContainer wikiContentContainer = getWikiContainer(ores, WIKI_RESOURCE_FOLDER_NAME);
    VFSLeaf leaf = (VFSLeaf) wikiContentContainer.resolve(page.getPageId() + "." + WIKI_PROPERTIES_SUFFIX);
    if (leaf == null) leaf = wikiContentContainer.createChildLeaf(page.getPageId() + "." + WIKI_PROPERTIES_SUFFIX);
    Properties p = getPageProperties(page);
    try {
      p.store(leaf.getOutputStream(false), "wiki page meta properties");
    } catch (IOException e) {
      throw new OLATRuntimeException(WikiManager.class, "failed to save wiki page properties for page with id: " + page.getPageId() +" and olatresource: " + ores.getResourceableId(), e);
    }
  }
View Full Code Here


                                                            : fString));

            try {
                FileOutputStream fos = new FileOutputStream(prefsFile);

                props.store(fos, "DatabaseManagerSwing user preferences");
                fos.flush();
                fos.close();
            } catch (IOException ioe) {
                throw new RuntimeException(
                    "Failed to prepare preferences file '" + prefsFile
View Full Code Here

      Properties p = new Properties();
      p.setProperty(MEDIA_FILE_FILENAME, filename);
      p.setProperty(MEDIA_FILE_CREATIONDATE, String.valueOf(System.currentTimeMillis()));
      p.setProperty(MEDIA_FILE_CREATED_BY, String.valueOf(author));
      try {
        p.store(metaFile.getOutputStream(false), "wiki media files meta properties");
      } catch (IOException e) {
        throw new OLATRuntimeException(WikiManager.class, "failed to save media files properties for file: " + filename +" and olatresource: " + ores.getResourceableId(), e);
      }
    }
  }
View Full Code Here

            try {
              p.load(metadata.getInputStream());
              p.setProperty(MEDIA_FILE_DELETIONDATE, String.valueOf(System.currentTimeMillis()));
              p.setProperty(MEDIA_FILE_DELETED_BY, String.valueOf(ureq.getIdentity().getKey()));
              OutputStream os = metadata.getOutputStream(false);
              p.store(os, "wiki media file meta properties");
              os.close();
            } catch (IOException e) {
              throw new OLATRuntimeException("Could'n read properties from media file: "+metadata.getName(), e);
            }
          }
View Full Code Here

      p.load(fis);
      fis.close();
      p.setProperty(WikiManager.PAGENAME, removeLinkTags(newWikiWord) );
      logDebug("TEST.renamePageNameInPropertiesFile: oldWikiPropertiesFileName=" + oldWikiPropertiesFileName + "  newWikiWord=" + newWikiWord, "");
      FileOutputStream fos = new FileOutputStream(new File(oldWikiPropertiesFileName));
      p.store(fos, "wiki page meta properties");
      fos.close();
    } catch (IOException e) {
      log("WARN: Wiki properties couldn't be read! Pagename:" + oldWikiPropertiesFileName,"");
    }
  }
View Full Code Here

      p.load(fis);
      fis.close();
      p.setProperty(WikiManager.PAGENAME, removeLinkTags(newWikiWord) );
      logDebug("TEST.renamePageNameInPropertiesFile: oldWikiPropertiesFileName=" + oldWikiPropertiesFileName + "  newWikiWord=" + newWikiWord, "");
      FileOutputStream fos = new FileOutputStream(new File(oldWikiPropertiesFileName));
      p.store(fos, "wiki page meta properties");
      fos.close();
    } catch (IOException e) {
      log("WARN: Wiki properties couldn't be read! Pagename:" + oldWikiPropertiesFileName,"");
    }
  }
View Full Code Here

      }
    }
    OutputStream out = null;
    try {
      out= new FileOutputStream(replacefilterfile);
      props.store(out, "Bundle Version Expansion Mapping");
    } catch (IOException ioe) {
      log("Failed to write replacefilterfile, "+replacefilterfile
          +", reason: "+ioe,
          Project.MSG_ERR);
      throw new BuildException("Failed to write replacefilterfile",ioe);
View Full Code Here

            new File(main.VIEWER_CONFIG_FILE).createNewFile();       
            Properties properties = new Properties();
            properties.put("server-address", server_address);
            properties.put("server-port", String.valueOf(server_port));            
       
            properties.store(new FileOutputStream(main.VIEWER_CONFIG_FILE),
                "jrdesktop viewer configuration file");
        } catch (Exception e) {
            e.getStackTrace();
        }           
    }   
View Full Code Here

        try {
            new File(main.CONFIG_FILE).createNewFile();       
            Properties properties = new Properties();
            properties.put("GUI-disabled", String.valueOf(GUI_disabled));
            properties.put("Systray-disabled", String.valueOf(Systray_disabled));       
            properties.store(new FileOutputStream(main.CONFIG_FILE),
                "jrdesktop configuration file");
           
           
        } catch (Exception e) {
            e.getStackTrace();
View Full Code Here

      props.setProperty("driverClass", driverClass);
      props.setProperty("user", user);
      props.setProperty("password", password);
      props.setProperty("url", url);
      FileOutputStream out = new FileOutputStream(this.getClass().getResource("/").getPath().replaceAll("%20"," ")+"pooler.ini");
      props.store(out,"POOLER PROPERTIES");
      try {
        out.close();
      }
      catch (IOException ex1) {
      }
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.