Examples of storeToXML()


Examples of java.util.Properties.storeToXML()

         }
      };
      sorted.putAll(properties);
      OutputStream stream = new FileOutputStream(outputFile);
      try {
         sorted.storeToXML(stream, null);
      } finally {
         stream.close();
      }
   }
View Full Code Here

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

Examples of java.util.Properties.storeToXML()

                "&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

Examples of java.util.Properties.storeToXML()

      if (o.toString().startsWith("jwall")
          || o.toString().startsWith("org.jwall"))
        p.put(o.toString(), System.getProperty(o.toString()));

    if (getPreferenceFileName().endsWith(".xml"))
      p.storeToXML(new FileOutputStream(f), "");
    else
      p.store(new FileOutputStream(f), "");
  }

  public String getLatestVersion() {
View Full Code Here

Examples of java.util.Properties.storeToXML()

            if (mainClass != null) {
                props.setProperty(IJvm.MAIN_CLASS_PROP_KEY, mainClass);
            }
            props.setProperty(IJvm.HOST_PROP_KEY, getHost().getName());

            props.storeToXML(os, "JVM Properties"); //$NON-NLS-1$
        } catch (CoreException e) {
            Activator.log(IStatus.ERROR, NLS.bind(
                    Messages.openOutputStreamFailedMsg, fileStore.toURI()
                            .getPath()), e);
        } catch (IOException e) {
View Full Code Here

Examples of java.util.Properties.storeToXML()

         }
      };
      sorted.putAll(properties);
      OutputStream stream = new FileOutputStream(outputFile);
      try {
         sorted.storeToXML(stream, null);
      } finally {
         stream.close();
      }
   }
View Full Code Here

Examples of java.util.Properties.storeToXML()

            propfile.createNewFile();
        } catch (IOException e1) {
            log.severe("Failed to create new file. " + e1);
        }
        try {
            prop.storeToXML(new FileOutputStream(propfile),
                    "Set of digital objects", "UTF-8");
        } catch (FileNotFoundException e) {
            log.severe("Could not store properties in file. " + e);
        } catch (IOException e) {
            log.severe("Could not store properties in file. " + e);
View Full Code Here

Examples of java.util.Properties.storeToXML()

              
        Properties p = System.getProperties();
       
        ByteArrayOutputStream byos = new ByteArrayOutputStream();
        try {
            p.storeToXML(byos, "Automatically generated for PLANETS Service ", "UTF-8");
            String res = byos.toString("UTF-8");
            System.out.println(res);
        } catch (IOException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of java.util.Properties.storeToXML()

         }
      };
      sorted.putAll(properties);
      OutputStream stream = new FileOutputStream(outputFile);
      try {
         sorted.storeToXML(stream, null);
      } finally {
         stream.close();
      }
   }
View Full Code Here

Examples of java.util.Properties.storeToXML()

         }
      };
      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.