< prev index next >

test/lib/jdk/test/lib/apps/LingeredApp.java

Print this page

        

@@ -24,13 +24,10 @@
 package jdk.test.lib.apps;
 
 import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
 import java.io.StringReader;
 import java.nio.file.Files;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
 import java.nio.file.Paths;

@@ -41,11 +38,10 @@
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.UUID;
 import jdk.test.lib.process.OutputBuffer;
-import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.process.StreamPumper;
 
 /**
  * This is a framework to launch an app that could be synchronized with caller
  * to make further attach actions reliable across supported platforms

@@ -135,10 +131,18 @@
     public Process getProcess() {
         return appProcess;
     }
 
     /**
+     * @return the LingeredApp's output.
+     * Can be called after the app is run.
+     */
+    public String getProcessStdout() {
+        return stdoutBuffer.toString();
+    }
+
+    /**
      *
      * @return OutputBuffer object for the LingeredApp's output. Can only be called
      * after LingeredApp has exited.
      */
     public OutputBuffer getOutput() {
< prev index next >