[embjopr-commits] EMBJOPR SVN: r135 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Wed Feb 4 12:53:45 EST 2009


Author: ozizka at redhat.com
Date: 2009-02-04 12:53:45 -0500 (Wed, 04 Feb 2009)
New Revision: 135

Added:
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java
Log:
Adding DebugUtils.java - few methods for debugging...

Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java	                        (rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DebugUtils.java	2009-02-04 17:53:45 UTC (rev 135)
@@ -0,0 +1,60 @@
+package org.jboss.jopr.jsfunit;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.channels.FileChannel;
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class DebugUtils {
+
+	protected static String workDir = System.getProperty("user.dir");
+
+	public static void setWorkDir(String workDir) {
+		DebugUtils.workDir = workDir;
+	}
+
+
+
+
+
+
+	public static void copyFile( String sFromPath, String sToPath ) throws IOException {
+
+		FileChannel in = new FileInputStream(sFromPath).getChannel();
+
+		new FileOutputStream(sToPath).getChannel().transferFrom( in, 0, in.size() );
+		
+	}
+
+
+	public static void writeFile( String sFilePath, String content ) throws FileNotFoundException, IOException{
+
+		new FileWriter(sFilePath).write(content);
+
+	}
+
+
+}
+
+
+
+/*
+
+
+
+ 						DebugUtils.copyFile("/home/ondra/work/JOPRembedded/emb-ds.xml", file.getAbsolutePath());///
+
+
+
+
+
+
+
+
+ */




More information about the embjopr-commits mailing list