Package java.util

Examples of java.util.Properties.storeToXML()


        myProps.setProperty("<a>&amp;key13&lt;</a>",
                "&amp;&value13<b>&amp;</b>");

        // store in UTF-8 encoding
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        myProps.storeToXML(out, "comment");
        out.close();

        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        Properties myProps2 = new Properties();
        myProps2.loadFromXML(in);
View Full Code Here


        props.setProperty("url", getUrl().toString());
        props.setProperty("segments", String.valueOf(segs));

        try
        {
            props.storeToXML(new FileOutputStream(new File(getTempFolder(), "index.xml")), "Warning: Editing this file may compromise the integrity of the download");
        }
        catch(IOException ex)
        {
            ex.printStackTrace();
        }
View Full Code Here

                "&amp;&value13<b>&amp;</b>");

        ByteArrayOutputStream out = new ByteArrayOutputStream();

        // store in UTF-8 encoding
        myProps.storeToXML(out, "comment");
        out.close();

        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        Properties myProps2 = new Properties();
        myProps2.loadFromXML(in);
View Full Code Here

    File meta = new File(fld,  name);
    if (!meta.exists()){
      meta.createNewFile();
    }
    FileOutputStream os = new FileOutputStream(meta);
    prop.storeToXML(os, "net-edit task description");
    os.close();
  }
 
}
View Full Code Here

    private void saveVersion(File properties, Long version) {
        Properties props = new Properties();
        props.put(VERSION, version.toString());
        try {
            FileOutputStream fileOutputStream = new FileOutputStream(properties);
            props.storeToXML(fileOutputStream, null);
        }
        catch (IOException e) {
            m_log.log(LogService.LOG_ERROR, "UpdateUserAdminTask failed to save local version number.");
        }
    }
View Full Code Here

   p.setProperty("BROWN_IVY_IVY",dir);
   p.setProperty("edu.brown.cs.ivy.IVY",dir);

   try {
      FileOutputStream os = new FileOutputStream(pf);
      p.storeToXML(os,"SETUP on " + new Date().toString());
      os.close();
    }
   catch (IOException e) {
      System.err.println("IVYSETUP: Problem writing property file: " + e);
      System.exit(1);
View Full Code Here

                props.put(SyncFolderB, "/Sample/Folder_B");
                props.put(SyncFolderStateB, "/Sample/Folder_B_OldState.xml");
                props.put(WastbasketFolderB, "/Sample/Folder_B_Trashbox");
                props.put(KeepLastFileVersionB, "true");

                props.storeToXML(new FileOutputStream(configFile), "Sample");

                OwnSyncException ose = new OwnSyncException("Config file does not exist, is created and initialized!");
                logger.throwing("OwnSyncStarter", "loadConfig(" + config + ")", ose);
                throw ose;
            }
View Full Code Here

        setLastSyncDate(folderStateStringProperties);

        try
        {
            folderStateStringProperties.storeToXML(new BufferedOutputStream(new FileOutputStream(storeInFile)), "OwnSync Folder snapshot description\n(C) Wilko Grey");
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

        setLastSyncDate(folderStateStringProperties);

        try
        {
            folderStateStringProperties.storeToXML(new BufferedOutputStream(new FileOutputStream(storeInFile)), "OwnSync Folder snapshot description\n(C) Wilko Grey");
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

         }
      };
      sorted.putAll(properties);
      OutputStream stream = new FileOutputStream(outputFile);
      try {
         sorted.storeToXML(stream, null);
      } finally {
         stream.close();
      }
   }
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.