Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r5402 - in branches/new-structure-with-base2/ps-mdm-base2: . src/main/java/org/perfsonar/base2/xml

Subject: perfsonar development work

List archive

perfsonar: r5402 - in branches/new-structure-with-base2/ps-mdm-base2: . src/main/java/org/perfsonar/base2/xml


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r5402 - in branches/new-structure-with-base2/ps-mdm-base2: . src/main/java/org/perfsonar/base2/xml
  • Date: Thu, 10 Dec 2009 06:14:15 -0500

Author: trzaszcz
Date: 2009-12-10 06:14:15 -0500 (Thu, 10 Dec 2009)
New Revision: 5402

Removed:
branches/new-structure-with-base2/ps-mdm-base2/build/
Modified:

branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
Log:
added method that serialize Element and write it file, build dir removed

Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
2009-12-10 11:10:36 UTC (rev 5401)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
2009-12-10 11:14:15 UTC (rev 5402)
@@ -1,5 +1,8 @@
package org.perfsonar.base2.xml;

+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashSet;
@@ -116,6 +119,29 @@

}

+ /**
+ *
+ * Serializes Element and write it to file
+ *
+ * @param file - dest file with serialized Element
+ * @param e - element to serialize
+ */
+ public void write(String file,Element e){
+
+ try {
+ File f=new File(file);
+ FileOutputStream fos=new FileOutputStream(f);
+ try {
+ write(fos,e);
+ } catch (XMLStreamException e1) {
+ e1.printStackTrace();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ } catch (FileNotFoundException e1) {
+ e1.printStackTrace();
+ }
+ }


public boolean isStartingDocumentDeclaration() {



  • perfsonar: r5402 - in branches/new-structure-with-base2/ps-mdm-base2: . src/main/java/org/perfsonar/base2/xml, svnlog, 12/10/2009

Archive powered by MHonArc 2.6.16.

Top of Page