webwork/src/test/webwork TestCaseSupport.java,1.4,1.5

[email protected] Sat, 08 Nov 2003 08:30:57 -0800
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/test/webwork
In directory sc8-pr-cvs1:/tmp/cvs-serv31476/webwork

Modified Files:
	TestCaseSupport.java 
Log Message:
Testcase for action reloading


Index: TestCaseSupport.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/test/webwork/TestCaseSupport.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- TestCaseSupport.java	2 Nov 2003 00:22:14 -0000	1.4
+++ TestCaseSupport.java	8 Nov 2003 16:30:55 -0000	1.5
@@ -5,6 +5,10 @@
  * See terms of license at opensource.org
  */
 package webwork;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.IOException;
+
 import junit.framework.TestCase;
 
 /**
@@ -24,5 +28,14 @@
 		e.printStackTrace();
 		fail(e.getMessage());
 	}
+
+  public void pipe(InputStream in, OutputStream out) throws IOException
+  {
+    byte[] buffer =  new byte[1024];
+    int lengthRead;
+
+    while((lengthRead = in.read(buffer)) >= 0)
+      out.write(buffer, 0, lengthRead);
+  }
 
 }




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/