[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Thu Sep 29 20:14:12 UTC 2005


kawas
Thu Sep 29 16:14:11 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util
In directory pub.open-bio.org:/tmp/cvs-serv2892/org/biomoby/registry/rdfagent/util

Modified Files:
	Report.java 
Log Message:
Handling the error stream, just in case, so that the system call doesnt hang.

moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Report.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java	2005/09/12 18:22:10	1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java	2005/09/29 20:14:11	1.8
@@ -12,10 +12,13 @@
  * To change the template for this generated type comment go to
  * Window>Preferences>Java>Code Generation>Code and Comments
  */
+import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.util.ArrayList;
 
 import org.biomoby.registry.rdfagent.verifier.Communicator;
@@ -101,6 +104,13 @@
                             "chmod +x _script_.sh");
                     p.waitFor();
                     p = Runtime.getRuntime().exec("./_script_.sh");
+                    InputStream stderr = p.getErrorStream();
+                    InputStreamReader isr = new InputStreamReader(stderr);
+                    BufferedReader br = new BufferedReader(isr);
+                    String line = null;
+                    while ((line = br.readLine()) != null) {
+
+                    }
                     p.waitFor();
                     Log.info("_script_.sh has "
                             + ((file.delete()) ? "" : "not ") + "been deleted"




More information about the MOBY-guts mailing list