Win32Process.java: Added nested class EOFInputStream.
[gcc.git] / libjava / java / lang / Win32Process.java
index 7d9e40fce4a3c6ece454add448a0f6c7fb503ede..f22b548820f03286d8ab53b7579fede0b5ba2273 100644 (file)
@@ -1,6 +1,6 @@
 // Win32Process.java - Subclass of Process for Win32 systems.
 
-/* Copyright (C) 2002, 2003, 2006  Free Software Foundation
+/* Copyright (C) 2002, 2003, 2006, 2007  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -51,9 +51,8 @@ final class Win32Process extends Process
 
   public native int waitFor () throws InterruptedException;
 
-  public Win32Process (String[] progarray,
-                          String[] envp,
-                          File dir)
+  public Win32Process (String[] progarray, String[] envp, File dir,
+                      boolean redirect)
     throws IOException
   {
     for (int i = 0; i < progarray.length; i++)
@@ -64,7 +63,7 @@ final class Win32Process extends Process
           progarray[i] = "\"" + s + "\"";
       }
 
-    startProcess (progarray, envp, dir);
+    startProcess (progarray, envp, dir, redirect);
   }
 
   // The standard streams (stdin, stdout and stderr, respectively)
@@ -81,8 +80,18 @@ final class Win32Process extends Process
 
   private native boolean hasExited ();
   private native void startProcess (String[] progarray,
-           String[] envp,
-           File dir)
+                                   String[] envp,
+                                   File dir,
+                                   boolean redirect)
     throws IOException;
   private native void cleanup ();
+
+  private static class EOFInputStream extends InputStream
+  {
+    static EOFInputStream instance = new EOFInputStream();
+    public int read()
+    {
+      return -1;
+    }
+  }
 }